.NET Portable TypeCast  3.1.0.4
A, easy-to-use tested, generic, portable, runtime-extensible, arbitrary type converter library
Core.TypeCast.IConverterCollection Interface Reference
+ Collaboration diagram for Core.TypeCast.IConverterCollection:

Public Member Functions

IConverterCollection Add (Converter converter, Type baseType=null, bool allowDisambiguates=false, CancellationToken cancellationToken=default(CancellationToken))
 Adds a Converter instance to the collection of ConverterCollection.Items More...
 
IConverterCollection Add< TIn, TOut > (Func< TIn, TOut > converterAction, Type baseType=null, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 
IConverterCollection Add< TIn, TOut, TBase > (Func< TIn, TOut > converterAction, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 
IConverterCollection Add< TIn, TArg, TOut > (Func< TIn, TArg, TOut > converterActionAny, Type baseType=null, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 
IConverterCollection Add< TIn, TOut, TBase > (Func< TIn, TOut, TOut > converterAction, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 
IConverterCollection Add (object converterDelegate, Type baseType=null, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 
IConverterCollection Add< TBase > (object converterDelegate, CancellationToken cancellationToken=default(CancellationToken))
 Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate More...
 

Properties

ConcurrentDictionary< Assembly, bool > AssemblyInitialized [get]
 Sets the Assembly as initialized in AssemblyInitialized More...
 
BlockingCollection< ConverterItems [get]
 The BlockingCollection<Converter> class provides a thread-safe collection with full support of the Producer-Consumer pattern, to store a collection of Converter instances. More...
 
int Count [get]
 Gets the count of singletons in the list. More...
 
ConverterCollectionSettings Settings [get, set]
 The settings for the ConverterCollection. More...
 

Detailed Description

Definition at line 18 of file IConverterCollection.cs.

Member Function Documentation

IConverterCollection Core.TypeCast.IConverterCollection.Add ( Converter  converter,
Type  baseType = null,
bool  allowDisambiguates = false,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Adds a Converter instance to the collection of ConverterCollection.Items

Parameters
converterThe Converter instance to add to the ConverterCollection.Items
baseTypeThe Type of the declaring and attributed custom converter class, if one exists
allowDisambiguatesOptional bool value to indicate whether to allow multiple converters with the same return and parameter Types in the collection of Items. Only set to true for transform functions.
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterCollectionExceptionThrows an exception if adding failed

Implemented in Core.TypeCast.ConverterCollection.

+ Here is the caller graph for this function:

IConverterCollection Core.TypeCast.IConverterCollection.Add ( object  converterDelegate,
Type  baseType = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Parameters
converterDelegateAn optional function delegate to use as the Converter.Function
baseTypeThe Type of the declaring and attributed custom converter class, if one exists
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.

Implemented in Core.TypeCast.ConverterCollection.

IConverterCollection Core.TypeCast.IConverterCollection.Add< TBase > ( object  converterDelegate,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Parameters
converterDelegateAn optional function delegate to use as the Converter.Function
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterExceptionThrows a ConverterCause.ConverterCollectionAddFailed with a wrapped Exception.InnerException if an internal error occurred
Type Constraints
TBase :class 
IConverterCollection Core.TypeCast.IConverterCollection.Add< TIn, TArg, TOut > ( Func< TIn, TArg, TOut >  converterActionAny,
Type  baseType = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Template Parameters
TInThe Source- / From- Typefrom which to Converter<TIn,TOut>.Convert(object,object)
TOutThe Target / To- Type to which to Converter<TIn,TOut>.Convert(object,object)
TArgThe Argument Type for generic converters using see ObjectExtension.ConvertTo<TIn, TOut>(TIn, object).
Parameters
converterActionAnyA function delegate Func<TIn, TArg, TOut> to use as the Converter.Function
baseTypeThe Type of the declaring and attributed custom converter class, if one exists
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterExceptionThrows a ConverterCause.ConverterCollectionAddFailed with a wrapped Exception.InnerException if an internal error occurred
IConverterCollection Core.TypeCast.IConverterCollection.Add< TIn, TOut > ( Func< TIn, TOut >  converterAction,
Type  baseType = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Template Parameters
TInThe Source- / From- Typefrom which to Converter<TIn,TOut>.Convert(object,object)
TOutThe Target / To- Type to which to Converter<TIn,TOut>.Convert(object,object)
Parameters
converterActionA function delegate Func<TIn, TOut> to use as the Converter.Function
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterExceptionThrows a ConverterCause.ConverterCollectionAddFailed with a wrapped Exception.InnerException if an internal error occurred
IConverterCollection Core.TypeCast.IConverterCollection.Add< TIn, TOut, TBase > ( Func< TIn, TOut >  converterAction,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Template Parameters
TInThe Source- / From- Typefrom which to Converter<TIn,TOut>.Convert(object,object)
TOutThe Target / To- Type to which to Converter<TIn,TOut>.Convert(object,object)
TBaseThe Type of the declaring and attributed custom converter class
Parameters
converterActionA function delegate Func<TIn, TOut> to use as the Converter.Function
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterExceptionThrows a ConverterCause.ConverterCollectionAddFailed with a wrapped Exception.InnerException if an internal error occurred
Type Constraints
TBase :class 
IConverterCollection Core.TypeCast.IConverterCollection.Add< TIn, TOut, TBase > ( Func< TIn, TOut, TOut >  converterAction,
CancellationToken  cancellationToken = default(CancellationToken) 
)

Creates and adds a Converter instance to the collection of ConverterCollection.Items using a Delegate

Template Parameters
TInThe Source- / From- Typefrom which to Converter<TIn,TOut>.Convert(object,object)
TOutThe Target / To- Type to which to Converter<TIn,TOut>.Convert(object,object)
Parameters
converterActionDefaultA function delegate Func<TIn, TOut, TOut> to use as the Converter.Function
baseTypeThe Type of the declaring and attributed custom converter class, if one exists
cancellationTokenOptional token to propagate notification that operations should be canceled. From System.Threading.Tasks.
Returns
Returns a IConverterCollection for safe, constricted function chaining.
Exceptions
ConverterExceptionThrows a ConverterCause.ConverterCollectionAddFailed with a wrapped Exception.InnerException if an internal error occurred
Type Constraints
TBase :class 

Property Documentation

ConcurrentDictionary<Assembly, bool> Core.TypeCast.IConverterCollection.AssemblyInitialized
get

Sets the Assembly as initialized in AssemblyInitialized

Parameters
typethe TypeInfo instance from which to lookup the TypeInfo.Assembly
Returns
Returns true if the concurrent dictionary update succeeded

Definition at line 25 of file IConverterCollection.cs.

int Core.TypeCast.IConverterCollection.Count
get

Gets the count of singletons in the list.

Definition at line 34 of file IConverterCollection.cs.

BlockingCollection<Converter> Core.TypeCast.IConverterCollection.Items
get

The BlockingCollection<Converter> class provides a thread-safe collection with full support of the Producer-Consumer pattern, to store a collection of Converter instances.

Definition at line 31 of file IConverterCollection.cs.

ConverterCollectionSettings Core.TypeCast.IConverterCollection.Settings
getset

The settings for the ConverterCollection.

Definition at line 39 of file IConverterCollection.cs.


The documentation for this interface was generated from the following file: