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

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