9 namespace Core.TypeCast
12 using System.Collections;
13 using System.Collections.Concurrent;
14 using System.Collections.Generic;
15 using System.Globalization;
17 using System.Linq.Expressions;
18 using System.Reflection;
19 using System.Runtime.CompilerServices;
20 using System.Runtime.InteropServices;
21 using System.Threading;
55 CancellationToken cancellationToken;
77 CancellationToken cancellationToken =
default(CancellationToken))
78 : this(converterCollection: converterCollection, settings: settings, cancellationToken: ref cancellationToken)
93 ref CancellationToken cancellationToken)
95 this.baseClass = converterCollection;
96 this.settings = settings;
97 this.cancellationToken = cancellationToken;
98 this.actions =
new List<Action>();
113 actions.Add(() => this.baseClass.Add<TIn, TOut, TBase>(converterAction,
this.cancellationToken));
129 actions.Add(() => this.baseClass.Add<TIn, TOut, TBase>(converterActionDefault,
this.cancellationToken));
149 if(this.settings != null)
152 this.baseClass.Settings = this.settings;
153 actions.Add(() => this.baseClass.Settings = tmp);
155 actions.Count(a => { a.Invoke();
return true; });
AddBuilder(ConverterCollection converterCollection, ConverterCollectionSettings settings, ref CancellationToken cancellationToken)
Creates a new instance of AddBuilder<TBase> for grouped-adding of converter-functions with mutual arg...
AddBuilder(ConverterCollection converterCollection, ConverterCollectionSettings settings=null, CancellationToken cancellationToken=default(CancellationToken))
Creates a new instance of AddBuilder<TBase> for grouped-adding of converter-functions with default ar...
IConverterCollection Cancel()
Dummy function to explicitly end the current chained builder operation without applying any deferred ...
The thread-safe, static collection of Converter items, using Core.Singleton and supporting Core...
The settings for the ConverterCollection.
ConverterCollectionSettings Settings
The settings for the ConverterCollection.
Allows to perform a deferred adding operation of multiple adds using a common Base-Class Type argumen...
IConverterCollection End()
End the deferred adding operation by invocation the deferred list of actions