예제 #1
0
        public override void WriteTo(pb::CodedOutputStream output)
        {
            int size = SerializedSize();

            if (HasGroupId)
            {
                output.WriteString(1, GroupId);
            }
            {
                output.WriteTag((int)2, pb::WireFormat.WireType.LengthDelimited);
                output.WriteRawVarint32((uint)Gang1.SerializedSize());
                Gang1.WriteTo(output);
            }
            {
                output.WriteTag((int)3, pb::WireFormat.WireType.LengthDelimited);
                output.WriteRawVarint32((uint)Gang2.SerializedSize());
                Gang2.WriteTo(output);
            }

            if (HasClashStatus)
            {
                output.WriteInt32(4, ClashStatus);
            }

            if (HasWinGang)
            {
                output.WriteInt64(5, WinGang);
            }
        }
예제 #2
0
        public override int SerializedSize()
        {
            int size = memoizedSerializedSize;

            if (size != -1)
            {
                return(size);
            }
            size = 0;
            if (HasGroupId)
            {
                size += pb::CodedOutputStream.ComputeStringSize(1, GroupId);
            }
            {
                int subsize = Gang1.SerializedSize();
                size += pb::CodedOutputStream.ComputeTagSize((int)2) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize;
            }
            {
                int subsize = Gang2.SerializedSize();
                size += pb::CodedOutputStream.ComputeTagSize((int)3) + pb::CodedOutputStream.ComputeRawVarint32Size((uint)subsize) + subsize;
            }
            if (HasClashStatus)
            {
                size += pb::CodedOutputStream.ComputeInt32Size(4, ClashStatus);
            }
            if (HasWinGang)
            {
                size += pb::CodedOutputStream.ComputeInt64Size(5, WinGang);
            }
            memoizedSerializedSize = size;
            return(size);
        }
예제 #3
0
//end merged
        public override bool IsInitialized()
        {
            if (HasGang1)
            {
                if (!Gang1.IsInitialized())
                {
                    return(false);
                }
            }
            if (HasGang2)
            {
                if (!Gang2.IsInitialized())
                {
                    return(false);
                }
            }
            return(true);
        }