} //TestHeartBeatR2S::Copy(...) public void Read(BinaryReader r) { this.protocError = r.ReadInt32(); if (this.protocError != 0) { throw new IOException("Protoc read error: The code is " + this.protocError, this.protocError); } this.protocId = r.ReadUInt16(); this.protocCRC = r.ReadUInt32(); if (CRC32 != this.protocCRC) { throw new IOException("Protoc read error: CRC32 is mismatched.", 499); } sbyte protoc2SExists = r.ReadSByte(); if ((sbyte)0x01 == protoc2SExists) { if (this.protoc2S == null) { this.protoc2S = new Protoc2S(); } this.protoc2S.Read(r); } else if ((sbyte)0x00 == protoc2SExists) { this.protoc2S = null; } else { throw new IOException("Protoc read error: The value of 'protoc2SExists' 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); } } //TestHeartBeatR2S::Read(...)
} //TestHeartBeatR2S::Reuse() public TestHeartBeatR2S Copy(TestHeartBeatR2S from_) { if (null == from_ || this == from_) { return this; } this.protocError = from_.protocError; this.protocId = from_.protocId; this.protocCRC = from_.protocCRC; if (null == from_.protoc2S) { this.protoc2S = null; } else { if (null == this.protoc2S) { this.protoc2S = new Protoc2S(); } this.protoc2S.Copy(from_.protoc2S); } 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; } //TestHeartBeatR2S::Copy(...)
} //Protoc2S::Reuse() public Protoc2S Copy(Protoc2S from_) { if (null == from_ || this == from_) { return this; } this.sessionId = from_.sessionId; 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; } //Protoc2S::Copy(...)
public TestHeartBeatR2S SetProtoc2S(Protoc2S value) { this.protoc2S = value; return this; }
public TestUserLogin2S SetProtoc2S(Protoc2S value) { this.protoc2S = value; return this; }