ComputeFixed64Size() private method

private ComputeFixed64Size ( int fieldNumber, ulong value ) : int
fieldNumber int
value ulong
return int
Exemplo n.º 1
0
        /// <summary>
        /// Computes the number of bytes required to encode this field, including field
        /// number.
        /// </summary>
        public int GetSerializedSize(int fieldNumber)
        {
            int result = 0;

            foreach (ulong value in varintList)
            {
                result += CodedOutputStream.ComputeUInt64Size(fieldNumber, value);
            }
            foreach (uint value in fixed32List)
            {
                result += CodedOutputStream.ComputeFixed32Size(fieldNumber, value);
            }
            foreach (ulong value in fixed64List)
            {
                result += CodedOutputStream.ComputeFixed64Size(fieldNumber, value);
            }
            foreach (ByteString value in lengthDelimitedList)
            {
                result += CodedOutputStream.ComputeBytesSize(fieldNumber, value);
            }
            foreach (UnknownFieldSet value in groupList)
            {
#pragma warning disable 0612
                result += CodedOutputStream.ComputeUnknownGroupSize(fieldNumber, value);
#pragma warning restore 0612
            }
            return(result);
        }