.NET Portable TypeCast
3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
|
Namespaces | |
namespace | Base |
namespace | Converters |
Classes | |
class | Converter |
The generic, strictly-typed converter class, for type casting and simple conversions. More... | |
class | ConverterAttribute |
Use ConverterAttribute to declare a class as a logical Type Converter. As such the only contingent declaration contract requirement is adherence to implement a public constructor which takes a IConverterCollection collection parameter More... | |
class | ConverterCollection |
The thread-safe, static collection of Converter items, using Core.Singleton and supporting Core.Singleton.ISingleton More... | |
class | ConverterCollectionException |
The Exception-type which is raised exclusively by the Converter<T> Library More... | |
class | ConverterCollectionFilters |
A set of IQueryable<Converter> extension methods for filtering ConverterCollection items using System.Linq | |
class | ConverterCollectionLookup |
A set of IQueryable<Converter> extension methods for filtering ConverterCollection items using System.Linq | |
class | ConverterCollectionSettings |
The settings for the ConverterCollection. More... | |
class | ConverterException |
The Exception-type which is raised exclusively by the Converter<TIn,TOut> Library More... | |
class | ConverterExtension |
The Converter extension methods | |
class | ConverterMethodAttribute |
Use ConverterMethodAttribute to declare a method in an arbitrary class as a logical Converter function. The only restriction towards the attributed method is a maximum of two defined function parameters. This limitation is by design, to advocate the use of the single responsibility principle, and building complex converters out of smaller ones, as implemented by a different library. Take a look at the examples and documentation for more information. More... | |
struct | ConverterParameters |
Container with sequentially assigned type-parameters of a strictly typed Converter-Function, in the sequence of Types for: In, Out, Argument More... | |
class | DependencyInjectionException |
The Exception-type which is raised exclusively by the DependencyInjection<TDependency> class More... | |
interface | IConvertContext |
The common IConvertContext interface. More... | |
interface | IConverter |
The Base Converter interface. More... | |
interface | IConverterCollection |
interface | IException |
The common Exceptioninterface. More... | |
interface | IFactory |
The generic, common factory interface for declaring factories creating arbitrary object instances requiring up to two arguments. Use a container type such as Tuple or struct as second parameter TIn2 if more parameters are required. More... | |
interface | IRepository |
The base repository interface More... | |
interface | IRepositoryEnumerable |
The generic repository interface with one lookup identifier More... | |
class | ObjectExtension |
The object extension methods to convert an object of an unrestricted unknown type TIn to an unrestricted known type TOut . | |
class Core::TypeCast::Converter |
The generic, strictly-typed converter class, for type casting and simple conversions.
TIn | The Source- / From- Typefrom which to Converter<TIn,TOut>.Convert(object,object) |
TOut | The Target / To- Type to which to Converter<TIn,TOut>.Convert(object,object) |
the class is declared sealed as the only converter implementation must be herein and no further implementation must be allowed, to enforce decoupling between arbitrary converter logic with a guaranteed implementation of the underlying converter-container in question
Definition at line 25 of file Converter_2T.cs.
struct Core::TypeCast::ConverterParameters |
Container with sequentially assigned type-parameters of a strictly typed Converter-Function, in the sequence of Types for: In, Out, Argument
Definition at line 20 of file ConverterParameters.cs.
Class Members | ||
---|---|---|
Type | Arg | |
int | Count | |
Type | In | |
Type | Out |
interface Core::TypeCast::IRepository |
The base repository interface
Implemented by any instantiable object which can provide data by passing an Identifier to facilitate lookup
Definition at line 18 of file IRepository.cs.
interface Core::TypeCast::IRepositoryEnumerable |
The generic repository interface with one lookup identifier
Implemented by any instantiable object which can provide data by passing one Identifier to facilitate lookup
TOut | : | IEnumerable |
Definition at line 31 of file IRepositoryEnumerable.cs.
|
strong |
Contains the reasons for a ConverterException to be raised.
Enumerator | |
---|---|
None |
Indicates the default or unspecified value |
Unknown |
Indicates an unknown or undefined flag |
Default |
Indicates a default or normal flag |
ConverterFunctionNull |
Indicates that the Converter.Function property is not set and |
ConverterArgumentNull |
Indicates that the Converter<TIn, TOut> or an passed argument to a Converter method is |
ConverterArgumentGenericType |
Indicates a generic input type Converter.From was passed, whilst being explicitly disallowed in the ConverterCollectionSettings instance |
ConverterArgumentWrongType |
Indicates that a Converter<TIn, TOut> method got passed an argument of a System.Type |
ConverterExists |
Indicates that the Converter<TIn, TOut>, defined by the Input and Output conversion Types |
ConvertFailed |
Indicates that the Converter<TIn,TOut>.Convert(object,object) method failed near or at the custom convert Function invocation |
ConverterWrapperError |
Indicates that the custom converter function wrapper yielded an error
|
InternalError |
Indicates an internal error state that may be specified further in the Exception.InnerException property Can be raised when the Converter's constructor must be explicitly called with parameters |
ConstructorInjectionNull |
Dependency Injection failed due to a Indicates that a conversion related class constructor was injected with an argument that is null |
ConverterCollectionAddFailed |
The Converter could not be added to the ConverterCollection The Converter instance was not added to the BlockingCollection<T> ConverterCollection.Items
|
InstanceRequiresParameters |
Indicates that the constructor of a parent Converter<TIn, TOut> class User-thrown exception in the custom parameter-less constructor of the logical Converter class |
ConverterNotImplemented |
Indicates that a method in a converter or conversion-related class instance does not possess a logical implementation. Make sure methods marked as virtual are overwritten. |
ConverterTypeInIsExplicitObject |
Indicates that the conversion source type is set to object, which is not sensible. Omit setting both target type parameters instead |
ConverterArgumentDelegateTooManyParameters |
Indicates that passed converter function takes too many parameters. A maximum of two is permitted. |
ConverterArgumentDelegateNoParameters |
Indicates that the passed converter function takes no parameters. At least one up two a maximum of two is required. |
ConverterAutoInitializationFailed |
Indicates that the reflection of the loading assembly failed, likely due to changes or security fixes for newer portable library class releases |
TransformRequiresEqualInOutTypes |
Indicates that the source and target types do not match. If they do not match use other functions instead, like CastTo and ConvertTo. |
InvalidCast |
Indicates that the cast failed, likely due to a missing converter. These exceptions can be suppressed with a function argument. |
DelegateArgumentWrongType |
Indicates that the argument types of a given delegate do not match the return type and / or types of the provided parameters. |
LogicError |
Indicates that the converter logic raised an |
BadInputFormat |
Indicates that the input argument was badly formatted. |
ConverterFunctionDefaultNull |
Indicates a null-reference for an existing Converter default function Flag Combinations |
Definition at line 20 of file ConverterCause.cs.
|
strong |
Contains the reasons for a ConverterCollectionException to be raised.
Enumerator | |
---|---|
None |
Indicates the default or unspecified value |
Unknown |
Indicates an unknown or undefined flag |
Default |
Indicates a default or normal flag |
InternalError |
Indicates an internal error state that may be specified further in the Exception.InnerException property Can be raised when the Converter's constructor must be explicitly called with parameters |
AddFailed |
The converter could not be added to the ConverterCollection
|
CollectionIsNull |
Indicates a null reference for the collection argument |
ConverterExists |
Indicates that the Converter<TIn, TOut>, defined by the Input and Output conversion Types |
ConverterArgumentNull |
Indicates that the Converter<TIn, TOut> or an passed argument to a Converter method is |
ConverterArgumentWrongType |
Indicates that a ConverterCollection method got passed an argument of a System.Type |
ConverterClassExists |
The custom converter / conversion-related class has already been instantiated and added to the to the ConverterCollection |
InstanceRequiresParameters |
Indicates that the constructor the ConverterCollection class requires parameters for proper instancing, yet was invoked without parameters. User-thrown exception in the custom parameter-less constructor of the logical Converter class |
ConverterFunctionsNull |
Indicates that the Converter.Function property and Converter.FunctionDefault is not set to a Delegate and |
AddFailedConverterExists |
The converter could not be added to the ConverterCollection because another converter for the specified input/output types already exists Flag Combinations |
Definition at line 19 of file ConverterCollectionCause.cs.