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