IOptionsMonitorCache<TOptions> Interface

Definition

Used by IOptionsMonitor<TOptions> to cache TOptions instances.

C#
public interface IOptionsMonitorCache<TOptions> where TOptions : class

Type Parameters

TOptions

The type of options being requested.

Derived

Methods

Clear()

Clears all options instances from the cache.

GetOrAdd(String, Func<TOptions>)

Gets a named options instance, or adds a new instance created with createOptions.

TryAdd(String, TOptions)

Tries to adds a new option to the cache, will return false if the name already exists.

TryRemove(String)

Try to remove an options instance.

Applies to

Produkt Versjoner
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1 (package-provided)