public static void Serialize(Stream stream, SubscriptionUpdateRequest instance) { if (instance.Ref.get_Count() > 0) { using (List <SubscriberReference> .Enumerator enumerator = instance.Ref.GetEnumerator()) { while (enumerator.MoveNext()) { SubscriberReference current = enumerator.get_Current(); stream.WriteByte(18); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); SubscriberReference.Serialize(stream, current); } } } }
public uint GetSerializedSize() { uint num = 0u; if (this.Ref.get_Count() > 0) { using (List <SubscriberReference> .Enumerator enumerator = this.Ref.GetEnumerator()) { while (enumerator.MoveNext()) { SubscriberReference current = enumerator.get_Current(); num += 1u; uint serializedSize = current.GetSerializedSize(); num += serializedSize + ProtocolParser.SizeOfUInt32(serializedSize); } } } return(num); }