internal static object Deserialize(Type t, BinaryTokenStreamReader stream) { var message = MessageEnvelope.Deserializer((byte[])SerializationManager.DeserializeInner(typeof(byte[]), stream)); return(new ResponseEnvelope(message)); }
internal static void Serialize(object obj, BinaryTokenStreamWriter stream, Type expected) { var envelope = (ResponseEnvelope)obj; SerializationManager.SerializeInner(MessageEnvelope.Serializer(envelope.Message), stream, typeof(byte[])); }