8internal class ModuleSerializer : BaseSerializer<Module>
10 public override List<FaunaType> GetSupportedTypes() =>
new List<FaunaType> {
FaunaType.Module, FaunaType.Null };
13 reader.CurrentTokenType
switch
15 TokenType.Module => reader.GetModule(),
16 _ =>
throw UnexpectedToken(reader.CurrentTokenType)
24 writer.WriteNullValue();
27 writer.WriteModuleValue(module);
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.
Represents a module, a singleton object grouping related functionalities. Modules are serialized as @...
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
FaunaType
An enum representing possible Fauna types.