Table of Contents

Class RuntimeConfiguration

Namespace
DCR.Workflow
Assembly
DCR.Workflow.dll
public class RuntimeConfiguration
Inheritance
RuntimeConfiguration
Inherited Members
Extension Methods

Constructors

RuntimeConfiguration()

public RuntimeConfiguration()

RuntimeConfiguration(IConfiguration, IOptions<RuntimeOptions>?, string)

public RuntimeConfiguration(IConfiguration config, IOptions<RuntimeOptions>? options = null, string prefix = "DCR:Workflow")

Parameters

config IConfiguration
options IOptions<RuntimeOptions>
prefix string

Fields

_authenticatorOptions

[JsonIgnore]
public Dictionary<string, (string, object)> _authenticatorOptions

Field Value

Dictionary<string, (string, object)>

_effects

[JsonPropertyName("DCR:Workflow:Effect:Effects")]
[JsonInclude]
public Dictionary<string, DerivedEffectOptions> _effects

Field Value

Dictionary<string, DerivedEffectOptions>

Properties

Authentications

[JsonPropertyName("DCR:Workflow:Effect:Authentication:Http")]
[JsonInclude]
public Dictionary<string, Dictionary<string, object?>> Authentications { get; }

Property Value

Dictionary<string, Dictionary<string, object>>

Auths

[JsonIgnore]
public IEnumerable<string> Auths { get; }

Property Value

IEnumerable<string>

Effects

[JsonIgnore]
public IEnumerable<string> Effects { get; }

Property Value

IEnumerable<string>

Options

[JsonPropertyName("DCR:Workflow:Runtime")]
public RuntimeOptions Options { get; }

Property Value

RuntimeOptions

Methods

AddSecrets(Dictionary<string, string>)

public void AddSecrets(Dictionary<string, string> secrets)

Parameters

secrets Dictionary<string, string>

CreateAuthenticator(string, IServiceProvider)

public IHttpAuthenticator? CreateAuthenticator(string id, IServiceProvider sp)

Parameters

id string
sp IServiceProvider

Returns

IHttpAuthenticator

FromJson(Stream, string)

public static RuntimeConfiguration FromJson(Stream json, string prefix = "DCR:Workflow")

Parameters

json Stream
prefix string

Returns

RuntimeConfiguration

FromJson(string, string)

Create runtime from JSON

public static RuntimeConfiguration FromJson(string json, string prefix = "DCR:Workflow")

Parameters

json string
prefix string

Returns

RuntimeConfiguration

Remarks

This function provides a quick way to construct a runtime given a JSON configuration.

Parsing the JSON configuration has considerable overhead. Consider using DCR.Workflow.RuntimeConfiguration.FromJson(string) to create a pre-parsed configuration that can be used to quickly create Runtimes using DCR.Workflow.RuntimeFactory.

GetEffectHash()

public byte[] GetEffectHash()

Returns

byte[]

Lookup(string)

public DerivedEffectOptions? Lookup(string id)

Parameters

id string

Returns

DerivedEffectOptions

SetSecrets(IEffect?)

public void SetSecrets(IEffect? effect)

Parameters

effect IEffect

ToJson()

Serialize this configuration out as JSON

public string ToJson()

Returns

string

Remarks

This format includes the DCR:Workflow prefix.