public static object Deserializer(System.Type expected, global::Orleans.Serialization.BinaryTokenStreamReader stream) { Shared.SessionStream result = new Shared.SessionStream(); result.CommandStream = ((Orleans.Streams.IAsyncStream<Shared.SocketCommand>)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Orleans.Streams.IAsyncStream<Shared.SocketCommand>), stream))); result.PacketStream = ((Orleans.Streams.IAsyncStream<System.Byte[]>)(Orleans.Serialization.SerializationManager.DeserializeInner(typeof(Orleans.Streams.IAsyncStream<System.Byte[]>), stream))); return result; }
public static object DeepCopier(object original) { Shared.SessionStream input = ((Shared.SessionStream)(original)); Shared.SessionStream result = new Shared.SessionStream(); Orleans.Serialization.SerializationContext.Current.RecordObject(original, result); result.CommandStream = ((Orleans.Streams.IAsyncStream<Shared.SocketCommand>)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.CommandStream))); result.PacketStream = ((Orleans.Streams.IAsyncStream<System.Byte[]>)(Orleans.Serialization.SerializationManager.DeepCopyInner(input.PacketStream))); return result; }