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

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

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

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