Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Fauna.Serialization.BaseSerializer< T > Class Template Referenceabstract

An abstract class encapsulating common serialization and deserialization logic. More...

Inheritance diagram for Fauna.Serialization.BaseSerializer< T >:
Fauna.Serialization.ISerializer< T >

Public Member Functions

virtual List< FaunaTypeGetSupportedTypes ()
 Supported types for the serializer.
 
- Public Member Functions inherited from Fauna.Serialization.ISerializer< T >
new T Deserialize (MappingContext ctx, ref Utf8FaunaReader reader)
 Consumes all or some of a Utf8FaunaReader and returns an instance of T .
 
object? Deserialize (MappingContext ctx, ref Utf8FaunaReader reader)
 Consumes all or some of a Utf8FaunaReader and returns an object or null.
 
void Serialize (MappingContext ctx, Utf8FaunaWriter writer, object? o)
 Serializes the provided object into the Utf8FaunaWriter.
 
List< FaunaTypeGetSupportedTypes ()
 A list of types to which the ISerializer applies.
 

Protected Member Functions

string UnsupportedSerializationTypeMessage (Type type)
 A helper to build an unsupported serialization type exception message.
 

Static Protected Member Functions

static TokenType EndTokenFor (TokenType start)
 Gets the end token for a given start token.
 

Detailed Description

An abstract class encapsulating common serialization and deserialization logic.

Template Parameters
TThe type the BaseSerializer applies to.

Definition at line 53 of file ISerializer.cs.

Member Function Documentation

◆ EndTokenFor()

static TokenType Fauna.Serialization.BaseSerializer< T >.EndTokenFor ( TokenType  start)
staticprotected

Gets the end token for a given start token.

Parameters
startA start token.
Returns
The end token.
Exceptions
ArgumentOutOfRangeExceptionThrown when the start token does not have a related end token.

Definition at line 67 of file ISerializer.cs.

◆ GetSupportedTypes()

virtual List< FaunaType > Fauna.Serialization.BaseSerializer< T >.GetSupportedTypes ( )
virtual

Supported types for the serializer.

Returns
A list of supported FaunaTypes.

◆ UnsupportedSerializationTypeMessage()

string Fauna.Serialization.BaseSerializer< T >.UnsupportedSerializationTypeMessage ( Type  type)
protected

A helper to build an unsupported serialization type exception message.

Parameters
typeThe unsupported type
Returns
An exception message to use.

The documentation for this class was generated from the following file: