Class WireFormat
This class is used internally by the Protocol Buffer Library and generated message implementations. It is public only for the sake of those generated messages. Others should not use this class directly.
This class contains constants and helper functions useful for dealing with the Protocol Buffer wire format.
Inheritance
System.Object
WireFormat
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Google.Protobuf
Assembly: Google.Protobuf.dll
Syntax
public static class WireFormat
Methods
GetTagFieldNumber(UInt32)
Given a tag value, determines the field number (the upper 29 bits).
Declaration
public static int GetTagFieldNumber(uint tag)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | tag |
Returns
Type | Description |
---|---|
System.Int32 |
GetTagWireType(UInt32)
Given a tag value, determines the wire type (lower 3 bits).
Declaration
public static WireFormat.WireType GetTagWireType(uint tag)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | tag |
Returns
Type | Description |
---|---|
WireFormat.WireType |
MakeTag(Int32, WireFormat.WireType)
Makes a tag value given a field number and wire type.
Declaration
public static uint MakeTag(int fieldNumber, WireFormat.WireType wireType)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | fieldNumber | |
WireFormat.WireType | wireType |
Returns
Type | Description |
---|---|
System.UInt32 |