public static void Serialize(Stream stream, FindChannelResponse instance) { if (instance.Channel.Count > 0) { foreach (ChannelDescription channel in instance.Channel) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, channel.GetSerializedSize()); ChannelDescription.Serialize(stream, channel); } } }
public static void Serialize(Stream stream, FindChannelResponse instance) { if (instance.Channel.get_Count() > 0) { using (List <ChannelDescription> .Enumerator enumerator = instance.Channel.GetEnumerator()) { while (enumerator.MoveNext()) { ChannelDescription current = enumerator.get_Current(); stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); ChannelDescription.Serialize(stream, current); } } } }
public static void Serialize(Stream stream, ChannelInfo instance) { if (instance.Description == null) { throw new ArgumentNullException("Description", "Required by proto specification."); } stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.Description.GetSerializedSize()); ChannelDescription.Serialize(stream, instance.Description); if (instance.Member.Count > 0) { foreach (Member member in instance.Member) { stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, member.GetSerializedSize()); bnet.protocol.channel.Member.Serialize(stream, member); } } }
public static void Serialize(Stream stream, ChannelInfo instance) { if (instance.Description == null) { throw new ArgumentNullException("Description", "Required by proto specification."); } stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, instance.Description.GetSerializedSize()); ChannelDescription.Serialize(stream, instance.Description); if (instance.Member.get_Count() > 0) { using (List <Member> .Enumerator enumerator = instance.Member.GetEnumerator()) { while (enumerator.MoveNext()) { Member current = enumerator.get_Current(); stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); bnet.protocol.channel.Member.Serialize(stream, current); } } } }
public void Serialize(Stream stream) { ChannelDescription.Serialize(stream, this); }