Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Fauna.Serialization.ISerializer< out T > Interface Template Reference

A generic interface that defines serialize and deserialize behavior for a specific type, and declares the supported FaunaType. More...

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

Public Member Functions

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.
 

Detailed Description

A generic interface that defines serialize and deserialize behavior for a specific type, and declares the supported FaunaType.

An interface that defines serialize and deserialize behavior for each supported FaunaType.

Template Parameters
TThe type ISerializer<T> applies to.

Definition at line 10 of file ISerializer.cs.

Member Function Documentation

◆ Deserialize() [1/2]

new T Fauna.Serialization.ISerializer< out T >.Deserialize ( MappingContext  ctx,
ref Utf8FaunaReader  reader 
)

Consumes all or some of a Utf8FaunaReader and returns an instance of T .

Parameters
ctxA MappingContext used to influence deserialization.
readerThe Utf8FaunaReader to consume.
Returns
An instance representing part or all of the consumed Utf8FaunaReader.

◆ Deserialize() [2/2]

object? Fauna.Serialization.ISerializer< out T >.Deserialize ( MappingContext  ctx,
ref Utf8FaunaReader  reader 
)

Consumes all or some of a Utf8FaunaReader and returns an object or null.

Parameters
ctxA MappingContext used to influence deserialization.
readerThe Utf8FaunaReader to consume.
Returns
An instance representing part or all of the consumed Utf8FaunaReader.

◆ GetSupportedTypes()

List< FaunaType > Fauna.Serialization.ISerializer< out T >.GetSupportedTypes ( )

A list of types to which the ISerializer applies.

Returns
A list of FaunaTypes.

◆ Serialize()

void Fauna.Serialization.ISerializer< out T >.Serialize ( MappingContext  ctx,
Utf8FaunaWriter  writer,
object?  o 
)

Serializes the provided object into the Utf8FaunaWriter.

Parameters
ctx>A MappingContext used to influence serialization.
writerThe Utf8FaunaWriter to write to.
oThe object to serialize.

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