コード例 #1
0
 /// <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));
 }
コード例 #2
0
 /// <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)));
 }
コード例 #3
0
 internal bool ContainsInputField(uint lastTag, Type target, out Extension extension)
 {
     return(extensions.TryGetValue(new ObjectIntPair <Type>(target, WireFormat.GetTagFieldNumber(lastTag)), out extension));
 }