public T Deserialize(MessageBuffer messageBuffer) { var stream = new MemoryStream(); var ret = OneXBinaryDecoder.ReadJsonBinary <T>(messageBuffer, stream, JsonOptions.Options); ((IBinaryMixedObject)ret).Stream = stream; return(ret); }
public void Serialize(MessageBuffer messageBuffer, T obj) { OneXBinaryDecoder.WriteJsonBinary <T>(messageBuffer, obj, ((IBinaryMixedObject)obj).Stream); }