Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class InMemorySettingsSource<T>

OptimaJet.Workflow.Core.Runtime.Settings.InMemorySettingsSource<T>

Provides an in-memory implementation of IServerSettingsSource<T> for settings of type T.

public class InMemorySettingsSource<T> : IServerSettingsSource<T> where T : new()

Inheritance

  • Object

Implemented Interfaces

Constructors

public InMemorySettingsSource(T settings) #
Initializes a new instance of the InMemorySettingsSource<T> class with an initial settings value.

Parameters

Name
Type
Description
settings
{T}
The initial settings value to hold in memory.

Methods

public Task<T> GetSettingsAsync() #
Gets the settings currently cached in memory.

Returns

Type
Description
Task<T>
A task whose result is the current T value.
public Task SaveSettingsAsync(T settings) #
Saves settings to memory, replacing the previously cached value.

Parameters

Name
Type
Description
settings
{T}
The new settings value to store in memory.

Returns

Type
Description
Task