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

                return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength);
            }
示例#2
0
 internal static void Write <T>(CodedOutputStream output, T value, FieldCodec <T> codec)
 {
     output.WriteLength(codec.CalculateSizeWithTag(value));
     codec.WriteTagAndValue(output, value);
 }