internal static int CalculateSize <T>(T value, FieldCodec <T> codec) { int fieldLength = codec.CalculateSizeWithTag(value); return(CodedOutputStream.ComputeLengthSize(fieldLength) + fieldLength); }
internal static void Write <T>(CodedOutputStream output, T value, FieldCodec <T> codec) { output.WriteLength(codec.CalculateSizeWithTag(value)); codec.WriteTagAndValue(output, value); }