Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

OptionsCache<TOptions> Class

Definition

Namespace:
Microsoft.Extensions.Options
Assembly:
Microsoft.Extensions.Options.dll
Package:
Microsoft.Extensions.Options v11.0.0-preview.5.26302.115
Source:
OptionsCache.cs
Source:
OptionsCache.cs
Source:
OptionsCache.cs
Source:
OptionsCache.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Caches TOptions instances.

generic <typename TOptions>
 where TOptions : classpublic ref class OptionsCache : Microsoft::Extensions::Options::IOptionsMonitorCache<TOptions>
public class OptionsCache<TOptions> : Microsoft.Extensions.Options.IOptionsMonitorCache<TOptions> where TOptions : class
type OptionsCache<'Options (requires 'Options : null)> = class
 interface IOptionsMonitorCache<'Options (requires 'Options : null)>
Public Class OptionsCache(Of TOptions)
Implements IOptionsMonitorCache(Of TOptions)

Type Parameters

TOptions

The type of options being requested.

Inheritance
OptionsCache<TOptions>
Implements

Constructors

Name Description
OptionsCache<TOptions>()

Initializes an instance of the OptionsCache<TOptions> class.

Methods

Name Description
Clear()

Clears all options instances from the cache.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetOrAdd(String, Func<TOptions>)

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

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryAdd(String, TOptions)

Tries to adds a new option to the cache.

TryRemove(String)

Tries to remove an options instance.

Applies to


Feedback

Was this page helpful?