Table of Contents

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
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 IMemoryCache
section string
filePath string

Properties

FilePath

public string FilePath { get; }

Property Value

string

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 string

The name of the TOptions instance, if nullDefaultName is used.

Returns

T

The TOptions instance that matches the given name.

UpdateAsync(Action<T>)

public Task UpdateAsync(Action<T> applyChanges)

Parameters

applyChanges Action<T>

Returns

Task