Struct ParseContext (3.15.8)

public 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
Boolean

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
Int32

ReadFixed32()

public uint ReadFixed32()

Reads a fixed32 field from the input.

Returns
TypeDescription
UInt32

ReadFixed64()

public ulong ReadFixed64()

Reads a fixed64 field from the input.

Returns
TypeDescription
UInt64

ReadFloat()

public float ReadFloat()

Reads a float field from the input.

Returns
TypeDescription
Single

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
Int32

ReadInt64()

public long ReadInt64()

Reads an int64 field from the input.

Returns
TypeDescription
Int64

ReadLength()

public int ReadLength()

Reads a length for length-delimited data.

Returns
TypeDescription
Int32
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
Int32

ReadSFixed64()

public long ReadSFixed64()

Reads an sfixed64 field value from the input.

Returns
TypeDescription
Int64

ReadSInt32()

public int ReadSInt32()

Reads an sint32 field value from the input.

Returns
TypeDescription
Int32

ReadSInt64()

public long ReadSInt64()

Reads an sint64 field value from the input.

Returns
TypeDescription
Int64

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
UInt32

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
UInt32

ReadUInt64()

public ulong ReadUInt64()

Reads a uint64 field from the input.

Returns
TypeDescription
UInt64