Fauna v10 .NET/C# Driver 1.0.1
 
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Fauna.Mapping.MappingContext Class Referencesealed

A class representing the mapping context to be used during serialization and deserialization. More...

Public Member Functions

 MappingContext ()
 Initializes an empty MappingContext.
 
 MappingContext (IEnumerable< DataContext.ICollection > collections)
 Initializes a MappingContext with associated collections.
 
 MappingContext (Dictionary< string, Type > collections)
 Initializes a MappingContext with associated collections.
 
bool TryGetCollection (string col, [NotNullWhen(true)] out MappingInfo? ret)
 Gets the MappingInfo for a given collection name.
 
bool TryGetBaseType (Type ty, [NotNullWhen(true)] out MappingInfo? ret)
 Gets the MappingInfo for a given Type.
 
MappingInfo GetInfo (Type ty, string? colName=null)
 Gets the MappingInfo for a given Type.
 

Detailed Description

A class representing the mapping context to be used during serialization and deserialization.

Definition at line 9 of file MappingContext.cs.

Constructor & Destructor Documentation

◆ MappingContext() [1/3]

Fauna.Mapping.MappingContext.MappingContext ( )

Initializes an empty MappingContext.

Definition at line 19 of file MappingContext.cs.

◆ MappingContext() [2/3]

Fauna.Mapping.MappingContext.MappingContext ( IEnumerable< DataContext::ICollection collections)

Initializes a MappingContext with associated collections.

Parameters
collectionsThe collections to associate.

Definition at line 25 of file MappingContext.cs.

◆ MappingContext() [3/3]

Fauna.Mapping.MappingContext.MappingContext ( Dictionary< string, Type >  collections)

Initializes a MappingContext with associated collections.

Parameters
collectionsThe collections to associate.

Definition at line 39 of file MappingContext.cs.

Member Function Documentation

◆ GetInfo()

MappingInfo Fauna.Mapping.MappingContext.GetInfo ( Type  ty,
string?  colName = null 
)

Gets the MappingInfo for a given Type.

Parameters
tyThe type to get.
colNameThe associated collection name, if any
Returns

Definition at line 75 of file MappingContext.cs.

◆ TryGetBaseType()

bool Fauna.Mapping.MappingContext.TryGetBaseType ( Type  ty,
[NotNullWhen(true)] out MappingInfo ret 
)

Gets the MappingInfo for a given Type.

Parameters
tyThe type to get.
retWhen this method returns, contains the MappingInfo associated with the type if found; otherwise, null. This parameter is passed uninitialized.
Returns
true if the MappingContext contains MappingInfo for the specified type; otherwise, false.

Definition at line 64 of file MappingContext.cs.

◆ TryGetCollection()

bool Fauna.Mapping.MappingContext.TryGetCollection ( string  col,
[NotNullWhen(true)] out MappingInfo ret 
)

Gets the MappingInfo for a given collection name.

Parameters
colThe collection name to get.
retWhen this method returns, contains the MappingInfo associated with the collection if found; otherwise, null. This parameter is passed uninitialized.
Returns
true if the MappingContext contains MappingInfo for the specified collection; otherwise, false.

Definition at line 53 of file MappingContext.cs.


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