Fauna v10 .NET/C# Driver
0.2.0-beta
Loading...
Searching...
No Matches
Fauna
Serialization
Serializers
ModuleSerializer.cs
Go to the documentation of this file.
1
using
Fauna.Mapping
;
2
using
Fauna.Types
;
3
4
namespace
Fauna.Serialization
;
5
6
7
internal
class
ModuleSerializer : BaseSerializer<Module>
8
{
9
public
override
Module
Deserialize(
MappingContext
context, ref Utf8FaunaReader reader) =>
10
reader.CurrentTokenType
switch
11
{
12
TokenType.Module => reader.GetModule(),
13
_ =>
throw
UnexpectedToken
(reader.CurrentTokenType)
14
};
15
16
public
override
void
Serialize(
MappingContext
context, Utf8FaunaWriter writer,
object
? o)
17
{
18
DynamicSerializer.Singleton.Serialize(context, writer, o);
19
}
20
}
Fauna.Mapping.MappingContext
A class representing the mapping context to be used during serialization and deserialization.
Definition
MappingContext.cs:9
Fauna.Serialization.BaseSerializer< Module >::UnexpectedToken
static SerializationException UnexpectedToken(TokenType token)
Fauna.Types.Module
Represents a module, a singleton object grouping related functionalities. Modules are serialized as @...
Definition
Module.cs:8
Fauna.Mapping
Definition
Attributes.cs:1
Fauna.Serialization
Definition
ISerializer.cs:3
Fauna.Types
Definition
BaseDocument.cs:3
Generated by
1.12.0