Exemplo n.º 1
0
 private MemoryMessageBody Payload()
 {
     if (serializer == null)
     {
         serializer = new TSerializer();
     }
     return(payload ?? (payload = serializer.Deserialize(MessageData.Payload)));
 }
Exemplo n.º 2
0
 /// <inheritdoc />
 public ArraySegment <byte> Serialize(MemoryMessageBody body)
 {
     return(new ArraySegment <byte>(serializationManager.SerializeToByteArray(body)));
 }
Exemplo n.º 3
0
 private MemoryMessageBody Payload()
 {
     return(payload ?? (payload = serializer.Deserialize(MessageData.Payload)));
 }
Exemplo n.º 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));
 }