Class OptionsUpdaterExtensions
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
optionsUpdaterIOptionsUpdater<TOptions>updaterAction<TOptions>The updater action. The single argument will be the
TOptionsinstance to update, which will contain the current options reflected by CurrentValue.
Type Parameters
TOptions
Exceptions
- ArgumentNullException
updateris 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
optionsUpdaterIOptionsUpdater<TOptions>namestringThe name of the
TOptionsinstance. If null, DefaultName, which is the empty string, is used.updaterAction<TOptions>The updater action. The single argument will be the
TOptionsinstance to update, which will contain the current options reflected by Get(string).
Type Parameters
TOptions
Exceptions
- ArgumentNullException
nameis null.- ArgumentNullException
updateris 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
optionsUpdaterIOptionsUpdater<TOptions>valueTOptionsThe updated
TOptionsinstance.
Type Parameters
TOptions