Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
Fauna.Serialization Namespace Reference

Classes

class  BaseRefSerializer
 
class  BaseSerializer
 An abstract class encapsulating common serialization and deserialization logic. More...
 
class  BooleanSerializer
 
class  ByteSerializer
 
class  BytesSerializer
 
class  ClassSerializer
 
class  DateOnlySerializer
 
class  DateTimeOffsetSerializer
 
class  DateTimeSerializer
 
class  DictionarySerializer
 
class  DoubleSerializer
 
class  DynamicSerializer
 
class  EventSourceSerializer
 
class  FloatSerializer
 
class  IntSerializer
 
interface  IPartialDocumentSerializer
 
interface  ISerializer
 A generic interface that defines serialize and deserialize behavior for a specific type, and declares the supported FaunaType. More...
 
class  ListSerializer
 
class  LongSerializer
 
class  ModuleSerializer
 
class  NamedRefSerializer
 
class  NullableSerializer
 
class  NullableStructSerializer
 
class  PageSerializer
 
class  QueryArrSerializer
 
class  QueryExprSerializer
 
class  QueryLiteralSerializer
 
class  QueryObjSerializer
 
class  QuerySerializer
 
class  QueryValSerializer
 
class  RefSerializer
 
class  SByteSerializer
 
class  Serializer
 Represents methods for serializing objects to and from Fauna's value format.
 
class  ShortSerializer
 
class  StringSerializer
 
class  TokenTypeExtensions
 A set of extension methods that operate on TokenType.
 
class  UIntSerializer
 
class  UShortSerializer
 
struct  Utf8FaunaReader
 Represents a reader that provides fast, non-cached, forward-only access to serialized data. More...
 
class  Utf8FaunaWriter
 Provides functionality for writing data in a streaming manner to a buffer or a stream. More...
 

Enumerations

enum  FaunaType {
  Int , Long , Double , String ,
  Date , Time , Boolean , Object ,
  Ref , Document , Array , Bytes ,
  Null , Stream , Module , Set
}
 An enum representing possible Fauna types. More...
 
enum  TokenType {
  None , StartObject , EndObject , StartArray ,
  EndArray , StartPage , EndPage , StartRef ,
  EndRef , StartDocument , EndDocument , FieldName ,
  String , Bytes , Int , Long ,
  Double , Date , Time , True ,
  False , Null , Module , EventSource
}
 Enumerates the types of tokens used in Fauna serialization. More...
 

Functions

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
 

Enumeration Type Documentation

◆ FaunaType

An enum representing possible Fauna types.

Enumerator
Int 

A Fauna integer.

Long 

A Fauna long.

Double 

A Fauna double.

String 

A Fauna string.

Date 

A Fauna date.

Time 

A Fauna time.

Boolean 

A Fauna boolean.

Object 

A Fauna object. This is different from a Document.

Ref 

A Fauna document reference. This includes named documents.

Document 

A Fauna document.

Array 

A Fauna array.

Bytes 

A Fauna byte array, stored as a base-64 encoded string.

Null 

A null value.

Stream 

A Fauna event source.

Module 

A Fauna module.

Set 

A Fauna set.

Definition at line 6 of file FaunaType.cs.

◆ TokenType

Enumerates the types of tokens used in Fauna serialization.

Enumerator
None 

There is no value. This is the default token type if no data has been read by the T:Fauna.Serialization.Utf8FaunaReader.

StartObject 

The token type is the start of a Fauna object.

EndObject 

The token type is the end of a Fauna object.

StartArray 

The token type is the start of a Fauna array.

EndArray 

The token type is the end of a Fauna array.

StartPage 

The token type is the start of a Fauna set (a.k.a. page).

EndPage 

The token type is the end of a Fauna set (a.k.a. page).

StartRef 

The token type is the start of a Fauna ref.

EndRef 

The token type is the end of a Fauna ref.

StartDocument 

The token type is the start of a Fauna document.

EndDocument 

The token type is the end of a Fauna document.

FieldName 

The token type is a Fauna property name.

String 

The token type is a Fauna string.

Bytes 

The token type is a Fauna byte array.

Int 

The token type is a Fauna integer.

Long 

The token type is a Fauna long.

Double 

The token type is a Fauna double.

Date 

The token type is a Fauna date.

Time 

The token type is a Fauna time.

True 

The token type is the Fauna literal true.

False 

The token type is the Fauna literal false.

Null 

The token type is the Fauna literal null.

Module 

The token type is the Fauna module.

EventSource 

The token type is the Fauna event source token.

Definition at line 6 of file TokenType.cs.

Function Documentation

◆ Deserialize()

T Fauna.Serialization.Deserialize ( MappingContext  ctx,
ref Utf8FaunaReader  reader 
)
abstract

Consumes or partially consumes the provided reader and deserializes into a result.

Parameters
ctxA MappingContext to influence deserialization.
readerA Utf8FaunaReader to consume or partially consume.
Returns

◆ Serialize()

void Fauna.Serialization.Serialize ( MappingContext  context,
Utf8FaunaWriter  writer,
object?  o 
)
abstract

Serializes the provided object onto the Utf8FaunaWriter

Parameters
contextA MappingContext to influence serialization.
writerA Utf8FaunaWriter to write to.
oThe object to write.