Class WritableJsonOptions<T>
- Namespace
- JJMasterData.Commons.Configuration.Options
- Assembly
- JJMasterData.Commons.dll
public class WritableJsonOptions<T> : IWritableOptions<T>, IOptionsSnapshot<T>, IOptions<T> where T : class, new()
Type Parameters
T
- Inheritance
-
WritableJsonOptions<T>
- Implements
-
IOptions<T>
- Inherited Members
Constructors
WritableJsonOptions(IOptionsMonitor<T>, IMemoryCache, string, string)
public WritableJsonOptions(IOptionsMonitor<T> options, IMemoryCache memoryCache, string section, string filePath)
Parameters
options
IOptionsMonitor<T>memoryCache
IMemoryCachesection
stringfilePath
string
Properties
FilePath
public string FilePath { get; }
Property Value
Value
The default configured TOptions
instance
public T Value { get; }
Property Value
- T
Methods
Get(string?)
Returns a configured TOptions
instance with the given name
.
public T Get(string? name)
Parameters
name
stringThe name of the
TOptions
instance, if nullDefaultName is used.
Returns
- T
The
TOptions
instance that matches the givenname
.
UpdateAsync(Action<T>)
public Task UpdateAsync(Action<T> applyChanges)
Parameters
applyChanges
Action<T>