public static void Serialize(Stream stream, GetAccountResponse instance) { if (instance.HasBlob) { stream.WriteByte(90); ProtocolParser.WriteUInt32(stream, instance.Blob.GetSerializedSize()); AccountBlob.Serialize(stream, instance.Blob); } if (instance.HasId) { stream.WriteByte(98); ProtocolParser.WriteUInt32(stream, instance.Id.GetSerializedSize()); AccountId.Serialize(stream, instance.Id); } if (instance.Email.get_Count() > 0) { using (List <string> .Enumerator enumerator = instance.Email.GetEnumerator()) { while (enumerator.MoveNext()) { string current = enumerator.get_Current(); stream.WriteByte(106); ProtocolParser.WriteBytes(stream, Encoding.get_UTF8().GetBytes(current)); } } } if (instance.HasBattleTag) { stream.WriteByte(114); ProtocolParser.WriteBytes(stream, Encoding.get_UTF8().GetBytes(instance.BattleTag)); } if (instance.HasFullName) { stream.WriteByte(122); ProtocolParser.WriteBytes(stream, Encoding.get_UTF8().GetBytes(instance.FullName)); } if (instance.Links.get_Count() > 0) { using (List <GameAccountLink> .Enumerator enumerator2 = instance.Links.GetEnumerator()) { while (enumerator2.MoveNext()) { GameAccountLink current2 = enumerator2.get_Current(); stream.WriteByte(130); stream.WriteByte(1); ProtocolParser.WriteUInt32(stream, current2.GetSerializedSize()); GameAccountLink.Serialize(stream, current2); } } } if (instance.HasParentalControlInfo) { stream.WriteByte(138); stream.WriteByte(1); ProtocolParser.WriteUInt32(stream, instance.ParentalControlInfo.GetSerializedSize()); ParentalControlInfo.Serialize(stream, instance.ParentalControlInfo); } }
public static void Serialize(Stream stream, AccountBlobList instance) { if (instance.Blob.Count > 0) { foreach (AccountBlob accountBlob in instance.Blob) { stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, accountBlob.GetSerializedSize()); AccountBlob.Serialize(stream, accountBlob); } } }
public static void Serialize(Stream stream, GetAccountResponse instance) { if (instance.HasBlob) { stream.WriteByte(90); ProtocolParser.WriteUInt32(stream, instance.Blob.GetSerializedSize()); AccountBlob.Serialize(stream, instance.Blob); } if (instance.HasId) { stream.WriteByte(98); ProtocolParser.WriteUInt32(stream, instance.Id.GetSerializedSize()); AccountId.Serialize(stream, instance.Id); } if (instance.Email.Count > 0) { foreach (string s in instance.Email) { stream.WriteByte(106); ProtocolParser.WriteBytes(stream, Encoding.UTF8.GetBytes(s)); } } if (instance.HasBattleTag) { stream.WriteByte(114); ProtocolParser.WriteBytes(stream, Encoding.UTF8.GetBytes(instance.BattleTag)); } if (instance.HasFullName) { stream.WriteByte(122); ProtocolParser.WriteBytes(stream, Encoding.UTF8.GetBytes(instance.FullName)); } if (instance.Links.Count > 0) { foreach (GameAccountLink gameAccountLink in instance.Links) { stream.WriteByte(130); stream.WriteByte(1); ProtocolParser.WriteUInt32(stream, gameAccountLink.GetSerializedSize()); GameAccountLink.Serialize(stream, gameAccountLink); } } if (instance.HasParentalControlInfo) { stream.WriteByte(138); stream.WriteByte(1); ProtocolParser.WriteUInt32(stream, instance.ParentalControlInfo.GetSerializedSize()); ParentalControlInfo.Serialize(stream, instance.ParentalControlInfo); } }
public static void Serialize(Stream stream, AccountBlobList instance) { if (instance.Blob.get_Count() > 0) { using (List <AccountBlob> .Enumerator enumerator = instance.Blob.GetEnumerator()) { while (enumerator.MoveNext()) { AccountBlob current = enumerator.get_Current(); stream.WriteByte(10); ProtocolParser.WriteUInt32(stream, current.GetSerializedSize()); AccountBlob.Serialize(stream, current); } } } }
public void Serialize(Stream stream) { AccountBlob.Serialize(stream, this); }