public override void WriteTo(pb::CodedOutputStream output) { int size = SerializedSize(); if (HasResult) { output.WriteInt32(1, Result); } { output.WriteTag((int)2, pb::WireFormat.WireType.LengthDelimited); output.WriteRawVarint32((uint)CapeInfo.SerializedSize()); CapeInfo.WriteTo(output); } if (HasOperate) { output.WriteInt32(3, Operate); } }
public override int SerializedSize() { int size = memoizedSerializedSize; if (size != -1) { return(size); } size = 0; if (HasResult) { size += pb::CodedOutputStream.ComputeInt32Size(1, Result); } { int subsize = CapeInfo.SerializedSize(); size += pb::CodedOutputStream.ComputeTagSize((int)2) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize; } if (HasOperate) { size += pb::CodedOutputStream.ComputeInt32Size(3, Operate); } memoizedSerializedSize = size; return(size); }