Table of Contents

Configure Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/ActionExtensions.cs

Configure<TOptions>(Action<TOptions>)

Provides a generic way to support the options pattern which enables using custom options classes to represent a group of related settings.

public static TOptions Configure<TOptions>(this Action<TOptions> setup) where TOptions : class, IParameterObject, new()

Parameters

setup Action<TOptions>

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

Returns

TOptions

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

Type Parameters

TOptions

The type of the custom options class.

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