Fauna .NET Driver
0.1.0-beta
Loading...
Searching...
No Matches
repo.git
Fauna
Serialization
CheckedDeserializer.cs
Go to the documentation of this file.
1
using
Fauna.Mapping
;
2
3
namespace
Fauna.Serialization
;
4
5
internal
class
CheckedDeserializer<T> :
BaseDeserializer
<T>
6
{
7
public
override
T Deserialize(
MappingContext
context, ref
Utf8FaunaReader
reader)
8
{
9
var tokenType = reader.CurrentTokenType;
10
var obj = DynamicDeserializer.Singleton.Deserialize(context, ref reader);
11
12
if
(obj is T v)
13
return
v;
14
else
15
throw
new
SerializationException
(
16
$
"Unexpected token while deserializing: {tokenType}"
);
17
}
18
}
Fauna.Mapping.MappingContext
Definition
MappingContext.cs:6
Fauna.Serialization.BaseDeserializer
Definition
IDeserializer.cs:16
Fauna.Serialization.SerializationException
Represents error that occur during serialization and deserialization of Fauna data.
Definition
SerializationException.cs:7
Fauna.Mapping
Definition
Attributes.cs:1
Fauna.Serialization
Definition
CheckedDeserializer.cs:3
Fauna.Serialization.Utf8FaunaReader
Represents a reader that provides fast, non-cached, forward-only access to serialized data.
Definition
Utf8FaunaReader.cs:13
Generated by
1.9.8