IOptionsMonitorCache<TOptions> Schnittstelle

Definition

Wird verwendet, IOptionsMonitor<TOptions> um Instanzen zwischenzuspeichern TOptions .

generic <typename TOptions>
 where TOptions : classpublic interface class IOptionsMonitorCache
public interface IOptionsMonitorCache<TOptions> where TOptions : class
type IOptionsMonitorCache<'Options (requires 'Options : null)> = interface
Public Interface IOptionsMonitorCache(Of TOptions)

Typparameter

TOptions

Der Typ der angeforderten Optionen.

Abgeleitet

Methoden

Name Beschreibung
Clear()

Löscht alle Optionsinstanzen aus dem Cache.

GetOrAdd(String, Func<TOptions>)

Ruft eine benannte Optionsinstanz ab oder fügt eine neue Instanz hinzu, die mit createOptions.

TryAdd(String, TOptions)

Versucht, dem Cache eine neue Option hinzufügt.

TryRemove(String)

Versucht, eine Optionsinstanz zu entfernen.

Gilt für: