public ref struct ParseContext
An opaque struct that represents the current parsing state and is passed along as the parsing proceeds. All the public methods are intended to be invoked only by the generated code, users should never invoke them directly.
Namespace
Google.ProtobufAssembly
Google.Protobuf.dll
Methods
ReadBool()
public bool ReadBool()
Reads a bool field from the input.
Returns | |
---|---|
Type | Description |
bool |
ReadBytes()
public ByteString ReadBytes()
Reads a bytes field value from the input.
Returns | |
---|---|
Type | Description |
ByteString |
ReadDouble()
public double ReadDouble()
Reads a double field from the input.
Returns | |
---|---|
Type | Description |
double |
ReadEnum()
public int ReadEnum()
Reads an enum field value from the input.
Returns | |
---|---|
Type | Description |
int |
ReadFixed32()
public uint ReadFixed32()
Reads a fixed32 field from the input.
Returns | |
---|---|
Type | Description |
uint |
ReadFixed64()
public ulong ReadFixed64()
Reads a fixed64 field from the input.
Returns | |
---|---|
Type | Description |
ulong |
ReadFloat()
public float ReadFloat()
Reads a float field from the input.
Returns | |
---|---|
Type | Description |
float |
ReadGroup(IMessage)
public void ReadGroup(IMessage message)
Reads an embedded group field from the input.
Parameter | |
---|---|
Name | Description |
message |
IMessage |
ReadInt32()
public int ReadInt32()
Reads an int32 field from the input.
Returns | |
---|---|
Type | Description |
int |
ReadInt64()
public long ReadInt64()
Reads an int64 field from the input.
Returns | |
---|---|
Type | Description |
long |
ReadLength()
public int ReadLength()
Reads a length for length-delimited data.
Returns | |
---|---|
Type | Description |
int |
This is internally just reading a varint, but this method exists to make the calling code clearer.
ReadMessage(IMessage)
public void ReadMessage(IMessage message)
Reads an embedded message field value from the input.
Parameter | |
---|---|
Name | Description |
message |
IMessage |
ReadSFixed32()
public int ReadSFixed32()
Reads an sfixed32 field value from the input.
Returns | |
---|---|
Type | Description |
int |
ReadSFixed64()
public long ReadSFixed64()
Reads an sfixed64 field value from the input.
Returns | |
---|---|
Type | Description |
long |
ReadSInt32()
public int ReadSInt32()
Reads an sint32 field value from the input.
Returns | |
---|---|
Type | Description |
int |
ReadSInt64()
public long ReadSInt64()
Reads an sint64 field value from the input.
Returns | |
---|---|
Type | Description |
long |
ReadString()
public string ReadString()
Reads a string field from the input.
Returns | |
---|---|
Type | Description |
string |
ReadTag()
public uint ReadTag()
Reads a field tag, returning the tag of 0 for "end of input".
Returns | |
---|---|
Type | Description |
uint |
The next field tag, or 0 for end of input. (0 is never a valid tag.) |
If this method returns 0, it doesn't necessarily mean the end of all the data in this CodedInputReader; it may be the end of the logical input for an embedded message, for example.
ReadUInt32()
public uint ReadUInt32()
Reads a uint32 field value from the input.
Returns | |
---|---|
Type | Description |
uint |
ReadUInt64()
public ulong ReadUInt64()
Reads a uint64 field from the input.
Returns | |
---|---|
Type | Description |
ulong |