Fauna v10 .NET/C# Driver 0.2.0-beta
 
Loading...
Searching...
No Matches
Fauna.Mapping.MappingContext Class Referencesealed

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

Public Member Functions

 MappingContext ()
 
 MappingContext (IEnumerable< DataContext.ICollection > collections)
 
 MappingContext (Dictionary< string, Type > 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 8 of file MappingContext.cs.

Constructor & Destructor Documentation

◆ MappingContext() [1/3]

Fauna.Mapping.MappingContext.MappingContext ( )

Definition at line 15 of file MappingContext.cs.

◆ MappingContext() [2/3]

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

Definition at line 17 of file MappingContext.cs.

◆ MappingContext() [3/3]

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

Definition at line 27 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 63 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 52 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 41 of file MappingContext.cs.


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