/// <summary> /// Encodes and writes a tag. /// </summary> public static void WriteTag(ref Span <byte> buffer, ref WriterInternalState state, int fieldNumber, WireFormat.WireType type) { WriteRawVarint32(ref buffer, ref state, 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))); }
internal bool ContainsInputField(uint lastTag, Type target, out Extension extension) { return(extensions.TryGetValue(new ObjectIntPair <Type>(target, WireFormat.GetTagFieldNumber(lastTag)), out extension)); }