internal static int CalculateSize <T>(T value, FieldCodec <T> codec) { int fieldLength = codec.CalculateSizeWithTag(value); return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength); }
public static int ComputeMessageSize(IMessage value) { int num = value.CalculateSize(); return(CodedOutputStream.ComputeLengthSize(num) + num); }
public static int ComputeBytesSize(ByteString value) { return(CodedOutputStream.ComputeLengthSize(value.Length) + value.Length); }
public static int ComputeStringSize(string value) { int num = CodedOutputStream.smethod_0(CodedOutputStream.Utf8Encoding, value); return(CodedOutputStream.ComputeLengthSize(num) + num); }