public override void WriteTo(pb::CodedOutputStream output) { int size = SerializedSize(); if (HasOperate) { output.WriteInt32(1, Operate); } do { foreach (TeamPKInfo element in teamPKInfoList) { output.WriteTag((int)2, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)element.SerializedSize()); element.WriteTo(output); } }while(false); if (HasLastReadyTime) { output.WriteInt32(3, LastReadyTime); } if (HasDiePuid) { output.WriteInt64(4, DiePuid); } if (HasKillPuid) { output.WriteInt64(5, KillPuid); } if (HasDieName) { output.WriteString(6, DieName); } if (HasKillName) { output.WriteString(7, KillName); } if (HasFlag) { output.WriteInt32(8, Flag); } if (HasResult) { output.WriteInt32(9, Result); } { output.WriteTag((int)10, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)Camp1.SerializedSize()); Camp1.WriteTo(output); } { output.WriteTag((int)11, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)Camp2.SerializedSize()); Camp2.WriteTo(output); } if (HasScoreBattle1) { output.WriteInt32(12, ScoreBattle1); } if (HasScoreBattle2) { output.WriteInt32(13, ScoreBattle2); } }
public override int SerializedSize() { int size = memoizedSerializedSize; if (size != -1) { return(size); } size = 0; if (HasOperate) { size += pb::CodedOutputStream.ComputeInt32Size(1, Operate); } { foreach (TeamPKInfo element in teamPKInfoList) { int subsize = element.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)2) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } } if (HasLastReadyTime) { size += pb::CodedOutputStream.ComputeInt32Size(3, LastReadyTime); } if (HasDiePuid) { size += pb::CodedOutputStream.ComputeInt64Size(4, DiePuid); } if (HasKillPuid) { size += pb::CodedOutputStream.ComputeInt64Size(5, KillPuid); } if (HasDieName) { size += pb::CodedOutputStream.ComputeStringSize(6, DieName); } if (HasKillName) { size += pb::CodedOutputStream.ComputeStringSize(7, KillName); } if (HasFlag) { size += pb::CodedOutputStream.ComputeInt32Size(8, Flag); } if (HasResult) { size += pb::CodedOutputStream.ComputeInt32Size(9, Result); } { int subsize = Camp1.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)10) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } { int subsize = Camp2.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)11) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } if (HasScoreBattle1) { size += pb::CodedOutputStream.ComputeInt32Size(12, ScoreBattle1); } if (HasScoreBattle2) { size += pb::CodedOutputStream.ComputeInt32Size(13, ScoreBattle2); } memoizedSerializedSize = size; return(size); }