Fauna v10 .NET/C# Driver
1.0.1
Loading...
Searching...
No Matches
repo.git
Fauna
Serialization
QuerySerializer.cs
Go to the documentation of this file.
1
using
Fauna.Exceptions
;
2
using
Fauna.Mapping
;
3
4
namespace
Fauna.Serialization
;
5
6
internal
class
QuerySerializer : BaseSerializer<Query>
7
{
8
public
override
Query
Deserialize
(
MappingContext
ctx, ref Utf8FaunaReader reader) =>
9
throw
new
NotImplementedException();
10
11
public
override
void
Serialize
(
MappingContext
context, Utf8FaunaWriter writer,
object
? obj)
12
{
13
switch
(obj)
14
{
15
case
null
:
16
writer.WriteNullValue();
17
break
;
18
case
Query
o:
19
var ser = Serializer.Generate(context, o.GetType());
20
ser.
Serialize
(context, writer, o);
21
break
;
22
default
:
23
throw
new
SerializationException
(
UnsupportedSerializationTypeMessage
(obj.GetType()));
24
}
25
}
26
}
Fauna.Exceptions.SerializationException
Represents error that occur during serialization and deserialization of Fauna data.
Definition
SerializationException.cs:7
Fauna.Mapping.MappingContext
A class representing the mapping context to be used during serialization and deserialization.
Definition
MappingContext.cs:10
Fauna.Query
Represents the abstract base class for constructing FQL queries.
Definition
Query.cs:11
Fauna.Query.Serialize
void Serialize(MappingContext ctx, Utf8FaunaWriter writer)
Serializes the query into the provided stream.
Fauna.Serialization.BaseSerializer< Query >::UnsupportedSerializationTypeMessage
string UnsupportedSerializationTypeMessage(Type type)
A helper to build an unsupported serialization type exception message.
Fauna.Exceptions
Definition
AbortException.cs:5
Fauna.Mapping
Definition
Attributes.cs:1
Fauna.Serialization
Definition
BaseRefSerializer.cs:5
Fauna.Serialization.Deserialize
object? ISerializer. Deserialize(MappingContext ctx, ref Utf8FaunaReader reader)
Consumes or partially consumes the provided reader and deserializes into a result.
Fauna.Serialization.Serialize
void ISerializer. Serialize(MappingContext context, Utf8FaunaWriter writer, object? o)
Serializes the provided object onto the Utf8FaunaWriter
Generated by
1.9.8