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. | |
A class representing the mapping context to be used during serialization and deserialization.
Definition at line 9 of file MappingContext.cs.
Fauna.Mapping.MappingContext.MappingContext | ( | ) |
Initializes an empty MappingContext.
Definition at line 19 of file MappingContext.cs.
Fauna.Mapping.MappingContext.MappingContext | ( | IEnumerable< DataContext::ICollection > | collections | ) |
Initializes a MappingContext with associated collections.
collections | The collections to associate. |
Definition at line 25 of file MappingContext.cs.
Fauna.Mapping.MappingContext.MappingContext | ( | Dictionary< string, Type > | collections | ) |
Initializes a MappingContext with associated collections.
collections | The collections to associate. |
Definition at line 39 of file MappingContext.cs.
MappingInfo Fauna.Mapping.MappingContext.GetInfo | ( | Type | ty, |
string? | colName = null |
||
) |
Gets the MappingInfo for a given Type.
ty | The type to get. |
colName | The associated collection name, if any |
Definition at line 75 of file MappingContext.cs.
bool Fauna.Mapping.MappingContext.TryGetBaseType | ( | Type | ty, |
[NotNullWhen(true)] out MappingInfo? | ret | ||
) |
Gets the MappingInfo for a given Type.
ty | The type to get. |
ret | When this method returns, contains the MappingInfo associated with the type if found; otherwise, null . This parameter is passed uninitialized. |
true
if the MappingContext contains MappingInfo for the specified type; otherwise, false
.Definition at line 64 of file MappingContext.cs.
bool Fauna.Mapping.MappingContext.TryGetCollection | ( | string | col, |
[NotNullWhen(true)] out MappingInfo? | ret | ||
) |
Gets the MappingInfo for a given collection name.
col | The collection name to get. |
ret | When this method returns, contains the MappingInfo associated with the collection if found; otherwise, null . This parameter is passed uninitialized. |
true
if the MappingContext contains MappingInfo for the specified collection; otherwise, false
.Definition at line 53 of file MappingContext.cs.