options library

Options

To use, import package:extensions/options.dart.

Classes

AsyncDisposable
Provides a mechanism for releasing unmanaged resources asynchronously.
CallbackNode
All of the state associated a registered callback, in a node that's part of a linked list of registered callbacks.
CancellationCallbackInfo
CancellationChangeToken
A ChangeToken implementation using CancellationToken.
CancellationToken
Propagates notification that operations should be canceled.
CancellationTokenRegistration
CancellationTokenSource
Signals to a CancellationToken that it should be canceled.
ChangeToken
Propagates notifications that a change has occurred.
CompositeChangeToken
An ChangeToken which represents one or more ChangeToken instances.
ConfigurationChangeTokenSource<TOptions>
Creates ChangeTokens so that OptionsMonitor gets notified when Configuration changes.
ConfigureNamedOptions<TOptions>
Represents something that configures the TOptions type.
ConfigureOptions<TOptions>
Represents something that configures the TOptions type. Note: These are run before all PostConfigureOptions.
Disposable
Provides a mechanism for releasing unmanaged resources.
LinkedNCancellationTokenSource
Options<TOptions>
Used to retrieve configured TOptions instances.
OptionsChangeTokenSource<TOptions>
Used to fetch ChangeToken used for tracking options changes.
OptionsFactory<TOptions>
Used to create TOptions instances.
OptionsMonitor<TOptions>
Used for notifications when TOptions instances change.
OptionsMonitorCache<TOptions>
Used by OptionsMonitor to cache TOptions instances.
OptionsSnapshot<TOptions>
Used to access the value of TOptions for the lifetime of a request.
PostConfigureOptions<TOptions>
Represents something that configures the TOptions type.
Registrations
Set of all the registrations in the token source.
ValidateOptions<TOptions>
Interface used to validate options.
ValidateOptions0<TOptions>
Implementation of ValidateOptions<TOptions>
ValidateOptions1<TOptions, TDep>
ValidateOptions2<TOptions, TDep1, TDep2>
ValidateOptions3<TOptions, TDep1, TDep2, TDep3>
ValidateOptions4<TOptions, TDep1, TDep2, TDep3, TDep4>
ValidateOptions5<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5>
ValidateOptionsResult
Represents the result of an options validation.

Extensions

OptionsServiceCollectionExtensions on ServiceCollection
Extension methods for adding options services to the DI container.

Typedefs

TimerCallback = void Function(Object? state)
ValidationCallback0<TOptions> = bool Function(TOptions options)
ValidationCallback1<TOptions, TDep> = bool Function(TOptions options, TDep dependency)
ValidationCallback2<TOptions, TDep1, TDep2> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2)
ValidationCallback3<TOptions, TDep1, TDep2, TDep3> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3)
ValidationCallback4<TOptions, TDep1, TDep2, TDep3, TDep4> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4)
ValidationCallback5<TOptions, TDep1, TDep2, TDep3, TDep4, TDep5> = bool Function(TOptions options, TDep1 dependency1, TDep2 dependency2, TDep3 dependency3, TDep4 dependency4, TDep5 dependency5)
VoidCallback = void Function()