public static MssLog GetDataFromMessage(byte[] message) { MssLog result = new MssLog(); using (var stream = new MemoryStream(message)) { result = Serializer.Deserialize <MssLog>(stream); } return(result); }
public static byte[] GetMess(MssLog mss) { byte[] msgOut; using (var stream = new MemoryStream()) { Serializer.Serialize(stream, mss); msgOut = stream.ToArray(); } return(msgOut); }
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); }