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

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