示例#1
0
 public static void SerializeStreamData(IStreamWriter stream, StreamDataCommand command)
 {
     ChannelIdSerializer.SerializeChannelId(stream, command.Channel);
     StreamOffsetSerializer.SerializeStreamOffset(stream, command.Offset);
     stream.WriteBool(command.IsAtEndPosition);
     stream.WriteLength((ushort)command.Payload.Length);
     stream.WriteOctets(command.Payload);
 }
示例#2
0
 public static void SerializePublishStream(IStreamWriter stream, PublishStreamCommand command)
 {
     ChannelIdSerializer.SerializeChannelId(stream, command.Channel);
     stream.WriteOctets(command.Payload);
 }