Class DerivedEffect
public class DerivedEffect : EffectBase, IEffect
- Inheritance
-
DerivedEffect
- Implements
- Inherited Members
- Extension Methods
Constructors
DerivedEffect(DerivedEffectOptions, ILogger<DerivedEffect>, IEffect)
public DerivedEffect(DerivedEffectOptions options, ILogger<DerivedEffect> logger, IEffect baseEffect)
Parameters
options
DerivedEffectOptionslogger
ILogger<DerivedEffect>baseEffect
IEffect
DerivedEffect(DerivedEffectOptions, IServiceProvider)
public DerivedEffect(DerivedEffectOptions options, IServiceProvider sp)
Parameters
options
DerivedEffectOptionssp
IServiceProvider
Fields
Options
public DerivedEffectOptions Options
Field Value
Properties
AtMostOnce
public override bool AtMostOnce { get; }
Property Value
BaseParameters
public Parameter[] BaseParameters { get; }
Property Value
Description
public override string Description { get; }
Property Value
Id
Id of the effect
public override string Id { get; }
Property Value
Remarks
This is the id used to identify the effect. Modellers use this id to indicate that an activity should have the effect
References
public IEnumerable<KeyValuePair<string, string>> References { get; }
Property Value
RequiredParameters
Parameters required to be set
public override Parameter[] RequiredParameters { get; }
Property Value
Remarks
The context parameter to Runtime.Execute must define at least the keys listed here.
ShouldRunActivityDidExecute
public override bool ShouldRunActivityDidExecute { get; }
Property Value
ShouldRunActivityWillExecute
public override bool ShouldRunActivityWillExecute { get; }
Property Value
Methods
ActivityDidExecute(Model, Activity, Dictionary<string, string>)
public override Task<Result> ActivityDidExecute(Model m, Activity a, Dictionary<string, string> parameters)
Parameters
m
Modela
Activityparameters
Dictionary<string, string>
Returns
ActivityWillExecute(Model, Activity, Dictionary<string, string>)
Callback to run effect before activity execution
public override Task<Result> ActivityWillExecute(Model m, Activity a, Dictionary<string, string> parameters)
Parameters
m
Modela
Activityparameters
Dictionary<string, string>The parameters for the effect. In value, references to model values, e.g.,
$(Activity)
are replaced with their values. [LINK: model value references docs] The dictionary is guaranteed to have defined value for all keys in RequiredParameters.
Returns
- Task<Result>
A pair of a Result structure and an optional state object to be passed in to a subsequent call to ActivityDidExecute.
Remarks
Execute the effect, possibly returning an updated value. The effect executes before the underlying activity is executed, and if the effect fails (throws), execution of the activity is aborted.
Clone()
public DerivedEffect Clone()
Returns
CompileArguments(Dictionary<string, string>, value)
public Dictionary<string, string> CompileArguments(Dictionary<string, string> input, value self)
Parameters
input
Dictionary<string, string>self
value
Returns
CreateTemplate(string, string, IServiceProvider)
public static DerivedEffectOptions CreateTemplate(string id, string tname, IServiceProvider sp)
Parameters
id
stringtname
stringsp
IServiceProvider
Returns
ExtractValueFromResult(Result, Dictionary<string, string>, Filters)
public Result ExtractValueFromResult(Result response, Dictionary<string, string> arguments, Output.Filters stage)
Parameters
Returns
SetAuthenticator(IHttpAuthenticator, Dictionary<string, string>)
public void SetAuthenticator(IHttpAuthenticator authenticator, Dictionary<string, string> secrets)
Parameters
authenticator
IHttpAuthenticatorsecrets
Dictionary<string, string>