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.
Namespace: OptimaJet.Workflow.Core.Runtime.Settings
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
runtimeWorkflowRuntimeThe runtime used to access persistence and settings values.
settingsParameterNameStringThe name of the global persistence parameter.
settingsParameterTypeStringThe 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