Table of Contents

Class OptionsUpdaterExtensions

Namespace
Acuit.Pinpoint.Common.Options
Assembly
Acuit.Pinpoint.Common.dll

Extension members for IOptionsUpdater<TOptions>.

public static class OptionsUpdaterExtensions
Inheritance
OptionsUpdaterExtensions
Inherited Members

Methods

UpdateValue<TOptions>(IOptionsUpdater<TOptions>, Action<TOptions>)

Updates the TOptions instance with the DefaultName via an updater method.

public static void UpdateValue<TOptions>(this IOptionsUpdater<TOptions> optionsUpdater, Action<TOptions> updater)

Parameters

optionsUpdater IOptionsUpdater<TOptions>
updater Action<TOptions>

The updater action. The single argument will be the TOptions instance to update, which will contain the current options reflected by CurrentValue.

Type Parameters

TOptions

Exceptions

ArgumentNullException

updater is null.

UpdateValue<TOptions>(IOptionsUpdater<TOptions>, string, Action<TOptions>)

Updates a named TOptions instance via an updater method.

public static void UpdateValue<TOptions>(this IOptionsUpdater<TOptions> optionsUpdater, string name, Action<TOptions> updater) where TOptions : notnull

Parameters

optionsUpdater IOptionsUpdater<TOptions>
name string

The name of the TOptions instance. If null, DefaultName, which is the empty string, is used.

updater Action<TOptions>

The updater action. The single argument will be the TOptions instance to update, which will contain the current options reflected by Get(string).

Type Parameters

TOptions

Exceptions

ArgumentNullException

name is null.

ArgumentNullException

updater is null.

UpdateValue<TOptions>(IOptionsUpdater<TOptions>, TOptions)

Updates the TOptions instance with the DefaultName.

public static void UpdateValue<TOptions>(this IOptionsUpdater<TOptions> optionsUpdater, TOptions value)

Parameters

optionsUpdater IOptionsUpdater<TOptions>
value TOptions

The updated TOptions instance.

Type Parameters

TOptions