private static Message DeserializeMessage(object @object) { using (var memoryStream = new MemoryStream()) { DynamicObjectSource.BroadCastData(@object, memoryStream); var binaryFormatter = new BinaryFormatter(); memoryStream.Position = 0; return((Message)binaryFormatter.Deserialize(memoryStream)); } }
public override void GetData(object target, Stream outgoingData) { DynamicObjectSource.BroadCastData(target, outgoingData); }