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