Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
QueryArrSerializer.cs
Go to the documentation of this file.
2using Fauna.Mapping;
3
4namespace Fauna.Serialization;
5
6internal class QueryArrSerializer : BaseSerializer<QueryArr>
7{
8 public override QueryArr 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 QueryArr o:
19 writer.WriteStartObject();
20 writer.WriteFieldName("array");
21 var ser = Serializer.Generate(context, o.Unwrap.GetType());
22 ser.Serialize(context, writer, o.Unwrap);
23 writer.WriteEndObject();
24 break;
25 default:
27 }
28 }
29}
Represents error that occur during serialization and deserialization of Fauna data.
A class representing the mapping context to be used during serialization and deserialization.
string UnsupportedSerializationTypeMessage(Type type)
A helper to build an unsupported serialization type exception message.
void Serialize(MappingContext ctx, Utf8FaunaWriter writer, object? o)
Serializes the provided object into the Utf8FaunaWriter.
object? ISerializer. Deserialize(MappingContext ctx, ref Utf8FaunaReader reader)
Consumes or partially consumes the provided reader and deserializes into a result.
void ISerializer. Serialize(MappingContext context, Utf8FaunaWriter writer, object? o)
Serializes the provided object onto the Utf8FaunaWriter