ComputeFixed32Size() private méthode

private ComputeFixed32Size ( int fieldNumber, uint value ) : int
fieldNumber int
value uint
Résultat int
Exemple #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);
        }