} //TestUserLoginR2C::Reuse() public TestUserLoginR2C Copy(TestUserLoginR2C from_) { if (null == from_ || this == from_) { return this; } this.protocError = from_.protocError; this.protocId = from_.protocId; this.protocCRC = from_.protocCRC; if (null == from_.protoc2C) { this.protoc2C = null; } else { if (null == this.protoc2C) { this.protoc2C = new Protoc2C(); } this.protoc2C.Copy(from_.protoc2C); } this.userId = from_.userId; this.userName = from_.userName; this.roles.Clear(); this.roles.AddRange(from_.roles); if (null == from_.hotfix) { this.hotfix = null; } else { if (null == this.hotfix) { this.hotfix = new Dictionary<String,String>(); } else { this.hotfix.Clear(); } foreach (var hotfixIter in from_.hotfix) { this.hotfix.Add(hotfixIter.Key, hotfixIter.Value); } } return this; } //TestUserLoginR2C::Copy(...)
} //TestHeartBeat2C::Copy(...) public void Read(BinaryReader r) { this.protocId = r.ReadUInt16(); this.protocCRC = r.ReadUInt32(); if (CRC32 != this.protocCRC) { throw new IOException("Protoc read error: CRC32 is mismatched.", 499); } sbyte protoc2CExists = r.ReadSByte(); if ((sbyte)0x01 == protoc2CExists) { if (this.protoc2C == null) { this.protoc2C = new Protoc2C(); } this.protoc2C.Read(r); } else if ((sbyte)0x00 == protoc2CExists) { this.protoc2C = null; } else { throw new IOException("Protoc read error: The value of 'protoc2CExists' is invalid.", 497); } sbyte hotfixExists = r.ReadSByte(); if ((sbyte)0x01 == hotfixExists) { if (this.hotfix == null) { this.hotfix = new Dictionary<String,String>(); } UInt32 lenHotfix = r.ReadUInt32(); for (UInt32 iHotfix = 0; iHotfix < lenHotfix; iHotfix++) { String k1 = Encoding.UTF8.GetString(r.ReadBytes(r.ReadInt32())); String v1 = Encoding.UTF8.GetString(r.ReadBytes(r.ReadInt32())); if (!this.hotfix.ContainsKey(k1)) { this.hotfix.Add(k1, v1); } else { this.hotfix[k1] = v1; } } } else if ((sbyte)0x00 == hotfixExists) { this.hotfix = null; } else { throw new IOException("Protoc read error: The value of 'hotfixExists' is invalid.", 498); } } //TestHeartBeat2C::Read(...)
} //TestServerTimeN2C::Reuse() public TestServerTimeN2C Copy(TestServerTimeN2C from_) { if (null == from_ || this == from_) { return this; } this.protocId = from_.protocId; this.protocCRC = from_.protocCRC; if (null == from_.protoc2C) { this.protoc2C = null; } else { if (null == this.protoc2C) { this.protoc2C = new Protoc2C(); } this.protoc2C.Copy(from_.protoc2C); } this.time = from_.time; if (null == from_.hotfix) { this.hotfix = null; } else { if (null == this.hotfix) { this.hotfix = new Dictionary<String,String>(); } else { this.hotfix.Clear(); } foreach (var hotfixIter in from_.hotfix) { this.hotfix.Add(hotfixIter.Key, hotfixIter.Value); } } return this; } //TestServerTimeN2C::Copy(...)
} //Protoc2C::Reuse() public Protoc2C Copy(Protoc2C from_) { if (null == from_ || this == from_) { return this; } if (null == from_.hotfix) { this.hotfix = null; } else { if (null == this.hotfix) { this.hotfix = new Dictionary<String,String>(); } else { this.hotfix.Clear(); } foreach (var hotfixIter in from_.hotfix) { this.hotfix.Add(hotfixIter.Key, hotfixIter.Value); } } return this; } //Protoc2C::Copy(...)
public TestHeartBeat2C SetProtoc2C(Protoc2C value) { this.protoc2C = value; return this; }
public TestUserLoginR2C SetProtoc2C(Protoc2C value) { this.protoc2C = value; return this; }
public TestServerTimeN2C SetProtoc2C(Protoc2C value) { this.protoc2C = value; return this; }