9 namespace Core.TypeCast.Base
14 using System.Diagnostics;
16 using System.Runtime.Serialization;
21 [System.Runtime.InteropServices.ComVisible(
false)]
32 public override object Create(Type converterClass)
49 if(collection?.ConverterClassInitialized.ContainsKey(converterClass.GetTypeInfo()) ==
true)
51 if(collection?.Settings.ConverterClassExistsException ==
true)
58 object customConverter;
64 customConverter = Instantiate(type: converterClass, parameters: collection as
IConverterCollection);
68 customConverter = Instantiate(type: converterClass);
71 catch(TargetInvocationException exc)
73 throw exc?.InnerException;
76 return customConverter;
Creates instances from classes which are attributed by ConverterAttribute
The thread-safe, static collection of Converter items, using Core.Singleton and supporting Core...
The converter dependency provides loose implementation of Converters, merely constricting the constru...
override object Create(Type converterClass, ConverterCollection collection=null)
Creates a new instance of Type converterClass
ConverterCollectionCause
Contains the reasons for a ConverterCollectionException to be raised.
The abstract generic factory for creating arbitrary instances requiring up to two arguments...
The Exception-type which is raised exclusively by the Converter<T> Library
override object Create(Type converterClass)
Creates a new instance of Type converterClass