< Summary

Information
Class: Elsa.Workflows.Models.ActivityWorkItem
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/ActivityWorkItem.cs
Line coverage
100%
Covered lines: 20
Uncovered lines: 0
Coverable lines: 20
Total lines: 58
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%22100%
get_Activity()100%11100%
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/Models/ActivityWorkItem.cs

#LineLine coverage
 1using Elsa.Workflows.Memory;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// Represents a work item that can be scheduled for execution.
 7/// </summary>
 8public class ActivityWorkItem
 9{
 10    /// <summary>
 11    /// Creates a new instance of the <see cref="ActivityWorkItem"/> class.
 12    /// </summary>
 314313    public ActivityWorkItem(
 314314        IActivity activity,
 314315        ActivityExecutionContext? owner = null,
 314316        object? tag = null,
 314317        IEnumerable<Variable>? variables = null,
 314318        ActivityExecutionContext? existingActivityExecutionContext = null,
 314319        IDictionary<string, object>? input = null)
 20    {
 314321        Activity = activity;
 314322        Owner = owner;
 314323        Tag = tag;
 314324        Variables = variables;
 314325        ExistingActivityExecutionContext = existingActivityExecutionContext;
 314326        Input = input ?? new Dictionary<string, object>();
 314327    }
 28
 29    /// <summary>
 30    /// The activity to be executed.
 31    /// </summary>
 318632    public IActivity Activity { get; }
 33
 34    /// <summary>
 35    /// The activity execution context that owns this work item, if any.
 36    /// </summary>
 651237    public ActivityExecutionContext? Owner { get; set; }
 38
 39    /// <summary>
 40    /// A tag that can be used to identify the work item.
 41    /// </summary>
 616242    public object? Tag { get; set; }
 43
 44    /// <summary>
 45    /// A set of variables to be created as part of the activity execution context.
 46    /// </summary>
 619847    public IEnumerable<Variable>? Variables { get; set; }
 48
 49    /// <summary>
 50    /// An existing activity execution context to schedule, if any.
 51    /// </summary>
 619852    public ActivityExecutionContext? ExistingActivityExecutionContext { get; set; }
 53
 54    /// <summary>
 55    /// Optional input to pass to the activity.
 56    /// </summary>
 619857    public IDictionary<string, object> Input { get; set; }
 58}