/// <summary> /// Encodes and writes a tag. /// </summary> /// <param name="fieldNumber">The number of the field to write the tag for</param> /// <param name="type">The wire format type of the tag to write</param> public void WriteTag(int fieldNumber, WireFormat.WireType type) { WriteRawVarint32(WireFormat.MakeTag(fieldNumber, type)); }
/// <summary> /// Computes the number of bytes that would be needed to encode a tag. /// </summary> public static int ComputeTagSize(int fieldNumber) { return(ComputeRawVarint32Size(WireFormat.MakeTag(fieldNumber, 0))); }