示例#1
0
        public static MssLog GetDataFromMessage(byte[] message)
        {
            MssLog result = new MssLog();

            using (var stream = new MemoryStream(message))
            {
                result = Serializer.Deserialize <MssLog>(stream);
            }
            return(result);
        }
示例#2
0
        public static byte[] GetMess(MssLog mss)
        {
            byte[] msgOut;

            using (var stream = new MemoryStream())
            {
                Serializer.Serialize(stream, mss);
                msgOut = stream.ToArray();
            }
            return(msgOut);
        }
示例#3
0
 public void PushLog(long CompanyID, string message, int typeCrawler, DateTime datePush, string runner)
 {
     updateProductJobClient_TrackCrawlerProduct.PublishJob(new Job()
     {
         Type = 0,
         Data = MssLog.GetMess(new MssLog()
         {
             CompanyID   = CompanyID,
             DateLog     = datePush,
             Mss         = message,
             Runner      = runner,
             TypeCrawler = typeCrawler
         })
     }, 10000000);
 }