Table of Contents

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

loggingOptions IDiagnosticsLogger<DbLoggerCategory.Infrastructure>

Methods

Register(IComplexTypeConverter)

public void Register(IComplexTypeConverter converter)

Parameters

converter IComplexTypeConverter

The 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

assembly Assembly

Register(Type)

Allocate and register a Type managing an instance of IComplexTypeConverter

public void Register(Type type)

Parameters

type Type

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

complexProperty IPropertyBase

The IComplexProperty to be converted

converter IComplexTypeConverter

The 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

complexPropertyType string

The CLR Type of the IComplexProperty to be converted

converter IComplexTypeConverter

The 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

complexPropertyType Type

The CLR Type of the IComplexProperty to be converted

converter IComplexTypeConverter

The IComplexTypeConverter associated to complexPropertyType

Returns

bool

true if the IComplexTypeConverter was found otherwise false