public static void Serialize(Stream stream, GetEBalanceRestrictionsResponse instance) { if (instance.CurrencyRestrictions.Count > 0) { foreach (CurrencyRestriction currencyRestriction in instance.CurrencyRestrictions) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, currencyRestriction.GetSerializedSize()); CurrencyRestriction.Serialize(stream, currencyRestriction); } } }
public static void Serialize(Stream stream, GetEBalanceRestrictionsResponse instance) { if (instance.CurrencyRestrictions.get_Count() > 0) { using (List <CurrencyRestriction> .Enumerator enumerator = instance.CurrencyRestrictions.GetEnumerator()) { while (enumerator.MoveNext()) { CurrencyRestriction current = enumerator.get_Current(); stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); CurrencyRestriction.Serialize(stream, current); } } } }
public void Serialize(Stream stream) { CurrencyRestriction.Serialize(stream, this); }