Class ComplexTypeConverterFactory
- Namespace
- MASES.EntityFrameworkCore.KNet.Serialization
- Assembly
- MASES.EntityFrameworkCore.KNet.Serialization.dll
Thread-safe implementation of IComplexTypeConverterFactory
public class ComplexTypeConverterFactory : IComplexTypeConverterFactory
- Inheritance
-
ComplexTypeConverterFactory
- Implements
- Inherited Members
Constructors
ComplexTypeConverterFactory(IDiagnosticsLogger<Infrastructure>)
Thread-safe implementation of IComplexTypeConverterFactory
public ComplexTypeConverterFactory(IDiagnosticsLogger<DbLoggerCategory.Infrastructure> loggingOptions)
Parameters
loggingOptionsIDiagnosticsLogger<DbLoggerCategory.Infrastructure>
Methods
Register(IComplexTypeConverter)
Register a IComplexTypeConverter
public void Register(IComplexTypeConverter converter)
Parameters
converterIComplexTypeConverterThe IComplexTypeConverter with all Type it manages (see SupportedClrTypes)
Register(Assembly)
Allocate and register all Type in an Assembly managing an instance of IComplexTypeConverter
public void Register(Assembly assembly)
Parameters
assemblyAssembly
Register(Type)
Allocate and register a Type managing an instance of IComplexTypeConverter
public void Register(Type type)
Parameters
typeType
TryGet(IPropertyBase?, out IComplexTypeConverter)
The method is used from IValueContainer<T> to retrieve IComplexTypeConverter associated to complexProperty
public bool TryGet(IPropertyBase? complexProperty, out IComplexTypeConverter converter)
Parameters
complexPropertyIPropertyBaseThe IComplexProperty to be converted
converterIComplexTypeConverterThe IComplexTypeConverter associated to
complexProperty
Returns
- bool
true if the IComplexTypeConverter was found otherwise false
TryGet(string, out IComplexTypeConverter)
The method is used from constructor of IValueContainer<T> to retrieve IComplexTypeConverter associated to complexPropertyType
public bool TryGet(string complexPropertyType, out IComplexTypeConverter converter)
Parameters
complexPropertyTypestringThe CLR Type of the IComplexProperty to be converted
converterIComplexTypeConverterThe IComplexTypeConverter associated to
complexPropertyType
Returns
- bool
true if the IComplexTypeConverter was found otherwise false
TryGet(Type, out IComplexTypeConverter)
The method is used from constructor of IValueContainer<T> to retrieve IComplexTypeConverter associated to complexPropertyType
public bool TryGet(Type complexPropertyType, out IComplexTypeConverter converter)
Parameters
complexPropertyTypeTypeThe CLR Type of the IComplexProperty to be converted
converterIComplexTypeConverterThe IComplexTypeConverter associated to
complexPropertyType
Returns
- bool
true if the IComplexTypeConverter was found otherwise false