msmq日志重发机制

public static void Resend(Log log)
        {
            object data = null;
            Type type = Type.GetType(log.Model);
            MethodInfo deSerialize = typeof(Jd.Api.WmsSerializable).GetMethod("DeSerialize");
            MethodInfo gDeSerialize = deSerialize.MakeGenericMethod(type);
            data = gDeSerialize.Invoke(null, new object[] { log.Xmlcontent });

            MethodInfo mi = typeof(Jd.Api.MSMQ).GetMethod("SendMessage");
            MethodInfo gmi = mi.MakeGenericMethod(type);
            gmi.Invoke(null, new object[] { log.Name, data });
        }

你可能感兴趣的:(日志)