< Summary

Information
Class: Elsa.Workflows.Options.ActivityInvocationOptions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Options/ActivityInvocationOptions.cs
Line coverage
40%
Covered lines: 8
Uncovered lines: 12
Coverable lines: 20
Total lines: 52
Line coverage: 40%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
.ctor(...)0%620%
get_Owner()100%11100%
get_Tag()100%11100%
get_Variables()100%11100%
get_ExistingActivityExecutionContext()100%11100%
get_Input()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Options/ActivityInvocationOptions.cs

#LineLine coverage
 1using Elsa.Workflows.Memory;
 2
 3namespace Elsa.Workflows.Options;
 4
 5/// <summary>
 6/// Represents options for invoking an activity.
 7/// </summary>
 8public class ActivityInvocationOptions
 9{
 10    /// <summary>Initializes a new instance of the <see cref="ActivityInvocationOptions"/> class.</summary>
 301911    public ActivityInvocationOptions()
 12    {
 301913        Input = new Dictionary<string, object>();
 301914    }
 15
 16    /// <summary>Initializes a new instance of the <see cref="ActivityInvocationOptions"/> class.</summary>
 17    /// <param name="owner">The activity execution context that owns this invocation.</param>
 18    /// <param name="tag">An optional tag that can be used to identify the invocation.</param>
 19    /// <param name="variables">The variables to declare in the activity execution context that will be created for this
 20    /// <param name="existingActivityExecutionContext">An existing activity execution context to reuse.</param>
 21    /// <param name="input">Optional input to pass to the activity.</param>
 022    public ActivityInvocationOptions(
 023        ActivityExecutionContext? owner,
 024        object? tag,
 025        IEnumerable<Variable>? variables,
 026        ActivityExecutionContext? existingActivityExecutionContext = default,
 027        IDictionary<string, object>? input = default)
 28    {
 029        Owner = owner;
 030        Tag = tag;
 031        Variables = variables;
 032        ExistingActivityExecutionContext = existingActivityExecutionContext;
 033        Input = input ?? new Dictionary<string, object>();
 034    }
 35
 36    /// <summary>The activity execution context that owns this invocation.</summary>
 600237    public ActivityExecutionContext? Owner { get; set; }
 38
 39    /// <summary>An optional tag that can be used to identify the invocation.</summary>
 600240    public object? Tag { get; set; }
 41
 42    /// <summary>The variables to declare in the activity execution context that will be created for this invocation.</s
 600243    public IEnumerable<Variable>? Variables { get; set; }
 44
 45    /// <summary>An existing activity execution context to reuse.</summary>
 603846    public ActivityExecutionContext? ExistingActivityExecutionContext { get; set; }
 47
 48    /// <summary>
 49    /// Optional input to pass to the activity.
 50    /// </summary>
 902151    public IDictionary<string, object> Input { get; set; }
 52}