Table of Contents

Configure Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Patterns.cs

Configure<TOptions>(Action<TOptions>, Action<TOptions>, Action<TOptions>)

Returns the default parameter-less constructed instance of TOptions configured with setup delegate.

public static TOptions Configure<TOptions>(Action<TOptions> setup, Action<TOptions> initializer = null, Action<TOptions> validator = null) where TOptions : class, IParameterObject, new()

Parameters

setup Action<TOptions>

The delegate that will configure the public read-write properties of TOptions.

initializer Action<TOptions>

The optional delegate that will initialize the default parameter-less constructed instance of TOptions. Should only be used with third party libraries or for validation purposes.

validator Action<TOptions>

The optional delegate that will validate the TOptions configured by the setup delegate.

Returns

TOptions

A default constructed instance of TOptions initialized with the options of setup.

Type Parameters

TOptions

The type of the configuration options class having a default constructor.

Remarks