예제 #1
0
 private MemoryMessageBody Payload()
 {
     if (serializer == null)
     {
         serializer = new TSerializer();
     }
     return(payload ?? (payload = serializer.Deserialize(MessageData.Payload)));
 }
예제 #2
0
 /// <inheritdoc />
 public ArraySegment <byte> Serialize(MemoryMessageBody body)
 {
     return(new ArraySegment <byte>(serializationManager.SerializeToByteArray(body)));
 }
예제 #3
0
 private MemoryMessageBody Payload()
 {
     return(payload ?? (payload = serializer.Deserialize(MessageData.Payload)));
 }
예제 #4
0
 /// <summary>
 /// Serialize MemoryMessageBody to an array segment of bytes.
 /// </summary>
 /// <param name="body"></param>
 /// <returns></returns>
 public ArraySegment<byte> Serialize(MemoryMessageBody body)
 {
     return new ArraySegment<byte>(SerializationManager.SerializeToByteArray(body));
 }