Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class DefaultSettingsSource<T>

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

Represents the default implementation of IServerSettingsSource<T>. It loads and persists settings of type T from runtime global storage.

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

Inheritance

  • Object

Implemented Interfaces

Constructors

public DefaultSettingsSource(WorkflowRuntime runtime, string settingsParameterName, string settingsParameterType) #
Initializes a new instance of the DefaultSettingsSource<T> class.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The runtime used to access persistence and settings values.
settingsParameterName
String
The name of the global persistence parameter.
settingsParameterType
String
The type discriminator used for global settings storage.

Methods

public Task<T> GetSettingsAsync() #
Retrieves settings from the persistence provider.

Returns

Type
Description
Task<T>
A task whose result is the loaded settings, or a new T instance when the provider returns no value.
public Task SaveSettingsAsync(T settings) #
Saves settings to the persistence provider.

Parameters

Name
Type
Description
settings
{T}
The settings object to persist.

Returns

Type
Description
Task