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. | |
double | GetDouble () |
Retrieves a double value from the current token. | |
decimal | GetDoubleAsDecimal () |
Retrieves a decimal value from the current token. | |
int | GetInt () |
Retrieves an integer 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. | |
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 12 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 44 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 54 of file Utf8FaunaReader.cs.
bool Fauna.Serialization.Utf8FaunaReader.GetBoolean | ( | ) |
Retrieves a boolean value from the current JSON token.
Definition at line 200 of file Utf8FaunaReader.cs.
DateOnly Fauna.Serialization.Utf8FaunaReader.GetDate | ( | ) |
Retrieves a DateOnly value from the current token.
Definition at line 216 of file Utf8FaunaReader.cs.
double Fauna.Serialization.Utf8FaunaReader.GetDouble | ( | ) |
Retrieves a double value from the current token.
Definition at line 234 of file Utf8FaunaReader.cs.
decimal Fauna.Serialization.Utf8FaunaReader.GetDoubleAsDecimal | ( | ) |
Retrieves a decimal value from the current token.
Definition at line 252 of file Utf8FaunaReader.cs.
int Fauna.Serialization.Utf8FaunaReader.GetInt | ( | ) |
Retrieves an integer value from the current token.
Definition at line 270 of file Utf8FaunaReader.cs.
long Fauna.Serialization.Utf8FaunaReader.GetLong | ( | ) |
Retrieves a long value from the current token.
Definition at line 288 of file Utf8FaunaReader.cs.
Module Fauna.Serialization.Utf8FaunaReader.GetModule | ( | ) |
Retrieves a Module object from the current token.
Definition at line 306 of file Utf8FaunaReader.cs.
string? Fauna.Serialization.Utf8FaunaReader.GetString | ( | ) |
Retrieves a string value from the current token.
Definition at line 179 of file Utf8FaunaReader.cs.
DateTime Fauna.Serialization.Utf8FaunaReader.GetTime | ( | ) |
Retrieves a DateTime value from the current token.
Definition at line 317 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 159 of file Utf8FaunaReader.cs.
bool Fauna.Serialization.Utf8FaunaReader.Read | ( | ) |
Reads the next token from the source.
Definition at line 92 of file Utf8FaunaReader.cs.
void Fauna.Serialization.Utf8FaunaReader.Skip | ( | ) |
Skips the value of the current token.
Definition at line 65 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 346 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 356 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 366 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 376 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 386 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 396 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 336 of file Utf8FaunaReader.cs.
|
get |
Gets the type of the current token.
Definition at line 32 of file Utf8FaunaReader.cs.