Class InitializerBuilder<T>
- Namespace
- Cuemon
- Assembly
- Cuemon.Core.dll
Supports the Initializer for building custom initializers.
public class InitializerBuilder<T>
where T : class
Type Parameters
T
The type of object to wrap.
- Inheritance
-
ObjectInitializerBuilder<T>
Properties
Instance
Gets the initialized instance.
public T Instance { get; }
Property Value
- T
The initialized instance.
Methods
Ignore(Action<T>, Func<Exception, Boolean>)
Ignores exceptions thrown by instance T
that is specified by the function delegate ignorer
.
public InitializerBuilder<T> Ignore(Action<T> initializer, Func<Exception, bool> ignorer)
Parameters
initializer
Action<T>The delegate that will continue initializing instance
T
while ignoring any exceptions specified byignorer
.ignorer
Func<Exception, Boolean>The function delegate that will parse thrown exceptions and ignore those specified.
Returns
- InitializerBuilder<T>
A reference to this instance.
IgnoreAny(Action<T>)
Ignores any exceptions that might be thrown by instance T
.
public InitializerBuilder<T> IgnoreAny(Action<T> initializer)
Parameters
initializer
Action<T>The delegate that will continue initializing instance
T
while ignoring any exceptions.
Returns
- InitializerBuilder<T>
A reference to this instance.
IgnoreMissingMethod(Action<T>)
Ignores any System.MissingMethodException that might be thrown by instance T
.
public InitializerBuilder<T> IgnoreMissingMethod(Action<T> initializer)
Parameters
initializer
Action<T>The delegate that will continue initializing instance
T
while ignoring any System.MissingMethodException.
Returns
- InitializerBuilder<T>
A reference to this instance.