Struct ParseContext (3.23.0)

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.Protobuf

Assembly

Google.Protobuf.dll

Methods

ReadBool()

public bool ReadBool()

Reads a bool field from the input.

Returns
TypeDescription
bool

ReadBytes()

public ByteString ReadBytes()

Reads a bytes field value from the input.

Returns
TypeDescription
ByteString

ReadDouble()

public double ReadDouble()

Reads a double field from the input.

Returns
TypeDescription
double

ReadEnum()

public int ReadEnum()

Reads an enum field value from the input.

Returns
TypeDescription
int

ReadFixed32()

public uint ReadFixed32()

Reads a fixed32 field from the input.

Returns
TypeDescription
uint

ReadFixed64()

public ulong ReadFixed64()

Reads a fixed64 field from the input.

Returns
TypeDescription
ulong

ReadFloat()

public float ReadFloat()

Reads a float field from the input.

Returns
TypeDescription
float

ReadGroup(IMessage)

public void ReadGroup(IMessage message)

Reads an embedded group field from the input.

Parameter
NameDescription
messageIMessage

ReadInt32()

public int ReadInt32()

Reads an int32 field from the input.

Returns
TypeDescription
int

ReadInt64()

public long ReadInt64()

Reads an int64 field from the input.

Returns
TypeDescription
long

ReadLength()

public int ReadLength()

Reads a length for length-delimited data.

Returns
TypeDescription
int
Remarks

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
NameDescription
messageIMessage

ReadSFixed32()

public int ReadSFixed32()

Reads an sfixed32 field value from the input.

Returns
TypeDescription
int

ReadSFixed64()

public long ReadSFixed64()

Reads an sfixed64 field value from the input.

Returns
TypeDescription
long

ReadSInt32()

public int ReadSInt32()

Reads an sint32 field value from the input.

Returns
TypeDescription
int

ReadSInt64()

public long ReadSInt64()

Reads an sint64 field value from the input.

Returns
TypeDescription
long

ReadString()

public string ReadString()

Reads a string field from the input.

Returns
TypeDescription
string

ReadTag()

public uint ReadTag()

Reads a field tag, returning the tag of 0 for "end of input".

Returns
TypeDescription
uint

The next field tag, or 0 for end of input. (0 is never a valid tag.)

Remarks

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
TypeDescription
uint

ReadUInt64()

public ulong ReadUInt64()

Reads a uint64 field from the input.

Returns
TypeDescription
ulong