Esempio n. 1
0
            internal static int CalculateSize <T>(T value, FieldCodec <T> codec)
            {
                int fieldLength = codec.CalculateSizeWithTag(value);

                return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength);
            }
Esempio n. 2
0
        public static int ComputeMessageSize(IMessage value)
        {
            int num = value.CalculateSize();

            return(CodedOutputStream.ComputeLengthSize(num) + num);
        }
Esempio n. 3
0
 public static int ComputeBytesSize(ByteString value)
 {
     return(CodedOutputStream.ComputeLengthSize(value.Length) + value.Length);
 }
Esempio n. 4
0
        public static int ComputeStringSize(string value)
        {
            int num = CodedOutputStream.smethod_0(CodedOutputStream.Utf8Encoding, value);

            return(CodedOutputStream.ComputeLengthSize(num) + num);
        }