コード例 #1
0
            internal static int CalculateSize <T>(T value, FieldCodec <T> codec)
            {
                int fieldLength = codec.CalculateSizeWithTag(value);

                return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength);
            }
コード例 #2
0
        public static int ComputeMessageSize(IMessage value)
        {
            int num = value.CalculateSize();

            return(CodedOutputStream.ComputeLengthSize(num) + num);
        }
コード例 #3
0
 public static int ComputeBytesSize(ByteString value)
 {
     return(CodedOutputStream.ComputeLengthSize(value.Length) + value.Length);
 }
コード例 #4
0
        public static int ComputeStringSize(string value)
        {
            int num = CodedOutputStream.smethod_0(CodedOutputStream.Utf8Encoding, value);

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