Class RuntimeConfiguration
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
IConfigurationoptions
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
Properties
Authentications
[JsonPropertyName("DCR:Workflow:Effect:Authentication:Http")]
[JsonInclude]
public Dictionary<string, Dictionary<string, object?>> Authentications { get; }
Property Value
Auths
[JsonIgnore]
public IEnumerable<string> Auths { get; }
Property Value
Effects
[JsonIgnore]
public IEnumerable<string> Effects { get; }
Property Value
Options
[JsonPropertyName("DCR:Workflow:Runtime")]
public RuntimeOptions Options { get; }
Property Value
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
stringsp
IServiceProvider
Returns
FromJson(Stream, string)
public static RuntimeConfiguration FromJson(Stream json, string prefix = "DCR:Workflow")
Parameters
Returns
FromJson(string, string)
Create runtime from JSON
public static RuntimeConfiguration FromJson(string json, string prefix = "DCR:Workflow")
Parameters
Returns
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
SetSecrets(IEffect?)
public void SetSecrets(IEffect? effect)
Parameters
effect
IEffect
ToJson()
Serialize this configuration out as JSON
public string ToJson()
Returns
Remarks
This format includes the DCR:Workflow
prefix.