Represents a reader that provides fast, non-cached, forward-only access to serialized data. More...
Public Member Functions | |
Utf8FaunaReader (ReadOnlySequence< byte > bytes) | |
Initializes a new Utf8FaunaReader to read from a ReadOnlySequence of bytes. | |
Utf8FaunaReader (string str) | |
Initializes a new Utf8FaunaReader to read from a string. | |
void | Skip () |
Skips the value of the current token. | |
bool | Read () |
Reads the next token from the source. | |
object? | GetValue () |
Gets the value of the current token. | |
string? | GetString () |
Retrieves a string value from the current token. | |
bool | GetBoolean () |
Retrieves a boolean value from the current JSON token. | |
DateOnly | GetDate () |
Retrieves a DateOnly value from the current token. | |
float | GetFloat () |
Retrieves a float value from the current token. | |
double | GetDouble () |
Retrieves a double value from the current token. | |
decimal | GetDoubleAsDecimal () |
Retrieves a decimal value from the current token. | |
byte | GetByte () |
Retrieves an byte value from the current token. | |
byte[] | GetBytes () |
Retrieves a byte array value from the current token. | |
sbyte | GetUnsignedByte () |
Retrieves an unsigned byte value from the current token. | |
int | GetInt () |
Retrieves an integer value from the current token. | |
uint | GetUnsignedInt () |
Retrieves an unsigned integer value from the current token. | |
short | GetShort () |
Retrieves an short value from the current token. | |
ushort | GetUnsignedShort () |
Retrieves an unsigned short value from the current token. | |
long | GetLong () |
Retrieves a long value from the current token. | |
Module | GetModule () |
Retrieves a Module object from the current token. | |
EventSource | GetEventSource () |
Retrieves an EventSource token string from the current token. | |
DateTime | GetTime () |
Retrieves a DateTime value from the current token. | |
string | TryGetString (out string value) |
Tries to retrieve a string value from the current token. | |
bool | TryGetBoolean (out bool value) |
Tries to retrieve a boolean value from the current token. | |
DateTime | TryGetDateTime (out DateTime value) |
Tries to retrieve a DateTime value from the current token. | |
double | TryGetDouble (out double value) |
Tries to retrieve a double value from the current token. | |
int | TryGetInt (out int value) |
Tries to retrieve an integer value from the current token. | |
long | TryGetLong (out long value) |
Tries to retrieve a long value from the current token. | |
Module | TryGetModule (out Module value) |
Tries to retrieve a Module object from the current token. | |
Properties | |
TokenType | CurrentTokenType [get] |
Gets the type of the current token. | |
Represents a reader that provides fast, non-cached, forward-only access to serialized data.
Definition at line 13 of file Utf8FaunaReader.cs.
Fauna.Serialization.Utf8FaunaReader.Utf8FaunaReader | ( | ReadOnlySequence< byte > | bytes | ) |
Initializes a new Utf8FaunaReader to read from a ReadOnlySequence of bytes.
bytes | The sequence of bytes to read from. |
Definition at line 47 of file Utf8FaunaReader.cs.
Fauna.Serialization.Utf8FaunaReader.Utf8FaunaReader | ( | string | str | ) |
Initializes a new Utf8FaunaReader to read from a string.
str | The string to read from. |
Definition at line 57 of file Utf8FaunaReader.cs.
bool Fauna.Serialization.Utf8FaunaReader.GetBoolean | ( | ) |
Retrieves a boolean value from the current JSON token.
Definition at line 208 of file Utf8FaunaReader.cs.
byte Fauna.Serialization.Utf8FaunaReader.GetByte | ( | ) |
Retrieves an byte value from the current token.
Definition at line 296 of file Utf8FaunaReader.cs.
byte[] Fauna.Serialization.Utf8FaunaReader.GetBytes | ( | ) |
Retrieves a byte array value from the current token.
Definition at line 314 of file Utf8FaunaReader.cs.
DateOnly Fauna.Serialization.Utf8FaunaReader.GetDate | ( | ) |
Retrieves a DateOnly value from the current token.
Definition at line 224 of file Utf8FaunaReader.cs.
double Fauna.Serialization.Utf8FaunaReader.GetDouble | ( | ) |
Retrieves a double value from the current token.
Definition at line 260 of file Utf8FaunaReader.cs.
decimal Fauna.Serialization.Utf8FaunaReader.GetDoubleAsDecimal | ( | ) |
Retrieves a decimal value from the current token.
Definition at line 278 of file Utf8FaunaReader.cs.
EventSource Fauna.Serialization.Utf8FaunaReader.GetEventSource | ( | ) |
Retrieves an EventSource token string from the current token.
Definition at line 449 of file Utf8FaunaReader.cs.
float Fauna.Serialization.Utf8FaunaReader.GetFloat | ( | ) |
Retrieves a float value from the current token.
Definition at line 242 of file Utf8FaunaReader.cs.
int Fauna.Serialization.Utf8FaunaReader.GetInt | ( | ) |
Retrieves an integer value from the current token.
Definition at line 350 of file Utf8FaunaReader.cs.
long Fauna.Serialization.Utf8FaunaReader.GetLong | ( | ) |
Retrieves a long value from the current token.
Definition at line 420 of file Utf8FaunaReader.cs.
Module Fauna.Serialization.Utf8FaunaReader.GetModule | ( | ) |
Retrieves a Module object from the current token.
Definition at line 438 of file Utf8FaunaReader.cs.
short Fauna.Serialization.Utf8FaunaReader.GetShort | ( | ) |
Retrieves an short value from the current token.
Definition at line 386 of file Utf8FaunaReader.cs.
string? Fauna.Serialization.Utf8FaunaReader.GetString | ( | ) |
Retrieves a string value from the current token.
Definition at line 186 of file Utf8FaunaReader.cs.
DateTime Fauna.Serialization.Utf8FaunaReader.GetTime | ( | ) |
Retrieves a DateTime value from the current token.
Definition at line 460 of file Utf8FaunaReader.cs.
sbyte Fauna.Serialization.Utf8FaunaReader.GetUnsignedByte | ( | ) |
Retrieves an unsigned byte value from the current token.
Definition at line 332 of file Utf8FaunaReader.cs.
uint Fauna.Serialization.Utf8FaunaReader.GetUnsignedInt | ( | ) |
Retrieves an unsigned integer value from the current token.
Definition at line 368 of file Utf8FaunaReader.cs.
ushort Fauna.Serialization.Utf8FaunaReader.GetUnsignedShort | ( | ) |
Retrieves an unsigned short value from the current token.
Definition at line 403 of file Utf8FaunaReader.cs.
object? Fauna.Serialization.Utf8FaunaReader.GetValue | ( | ) |
Gets the value of the current token.
SerializationException | Thrown when an error occurs during token value retrieval. |
Definition at line 165 of file Utf8FaunaReader.cs.
bool Fauna.Serialization.Utf8FaunaReader.Read | ( | ) |
Reads the next token from the source.
Definition at line 95 of file Utf8FaunaReader.cs.
void Fauna.Serialization.Utf8FaunaReader.Skip | ( | ) |
Skips the value of the current token.
Definition at line 68 of file Utf8FaunaReader.cs.
bool Fauna.Serialization.Utf8FaunaReader.TryGetBoolean | ( | out bool | value | ) |
Tries to retrieve a boolean value from the current token.
value | When this method returns, contains the boolean value, if the conversion succeeded, or false if the conversion failed. |
Definition at line 489 of file Utf8FaunaReader.cs.
DateTime Fauna.Serialization.Utf8FaunaReader.TryGetDateTime | ( | out DateTime | value | ) |
Tries to retrieve a DateTime value from the current token.
value | When this method returns, contains the DateTime value, if the conversion succeeded, or the default DateTime value if the conversion failed. |
Definition at line 499 of file Utf8FaunaReader.cs.
double Fauna.Serialization.Utf8FaunaReader.TryGetDouble | ( | out double | value | ) |
Tries to retrieve a double value from the current token.
value | When this method returns, contains the double value, if the conversion succeeded, or 0.0 if the conversion failed. |
Definition at line 509 of file Utf8FaunaReader.cs.
int Fauna.Serialization.Utf8FaunaReader.TryGetInt | ( | out int | value | ) |
Tries to retrieve an integer value from the current token.
value | When this method returns, contains the integer value, if the conversion succeeded, or 0 if the conversion failed. |
Definition at line 519 of file Utf8FaunaReader.cs.
long Fauna.Serialization.Utf8FaunaReader.TryGetLong | ( | out long | value | ) |
Tries to retrieve a long value from the current token.
value | When this method returns, contains the long value, if the conversion succeeded, or 0 if the conversion failed. |
Definition at line 529 of file Utf8FaunaReader.cs.
Tries to retrieve a Module object from the current token.
value | When this method returns, contains the Module object, if the conversion succeeded, or null if the conversion failed. |
Definition at line 539 of file Utf8FaunaReader.cs.
string Fauna.Serialization.Utf8FaunaReader.TryGetString | ( | out string | value | ) |
Tries to retrieve a string value from the current token.
value | When this method returns, contains the string value, if the conversion succeeded, or null if the conversion failed. |
Definition at line 479 of file Utf8FaunaReader.cs.
|
get |
Gets the type of the current token.
Definition at line 34 of file Utf8FaunaReader.cs.