public static Message Create(Header h, ArraySegment<byte> oArray) { Message m = new Message(); m._header = h; m._object = MessageUtils.CreateObject(h.MessageId); IMessageSerializer s = (IMessageSerializer)m._object; s.FromRawData(oArray); return m; }
public static Header ParseHeader(ArraySegment<byte> hArray) { Header h = new Header(); h.FromRawData(hArray); return h; }
public static Message Create(IMessageSerializer o, uint toInbox, int ttl, bool cacheInReceived, bool cacheInSent) { Header h = new Header(); h.Inbox = toInbox; h.ExpireDate = DateTime.Now.Ticks + TimeSpan.FromHours(ttl).Ticks; h.CacheInReceivedMessages = cacheInReceived; h.CacheInSentMessages = cacheInSent; Message m = new Message(); m._header = h; m._object = o; return m; }
public static Message Create(IMessageSerializer o, uint toInbox, int ttl) { Header h = new Header(); h.Inbox = toInbox; h.ExpireDate = DateTime.Now.Ticks + TimeSpan.FromHours(ttl).Ticks; Message m = new Message(); m._header = h; m._object = o; return m; }
public static Message Create(IMessageSerializer o, uint toInbox) { Header h = new Header(); h.Inbox = toInbox; Message m = new Message(); m._header = h; m._object = o; return m; }
public static Message Create(Header h, IMessageSerializer o) { Message m = new Message(); m._header = h; m._object = o; return m; }