< Summary

Information
Class: Elsa.Workflows.Activities.DynamicActivity
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/DynamicActivity.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 15
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Properties()100%210%
get_ExecuteHandler()100%210%
ExecuteAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Activities/DynamicActivity.cs

#LineLine coverage
 1using System.ComponentModel;
 2
 3namespace Elsa.Workflows.Activities;
 4
 5/// <summary>
 6/// A dynamically provided activity with custom properties. This is experimental and may be removed.
 7/// </summary>
 8[Browsable(false)]
 9public class DynamicActivity : CodeActivity
 10{
 011    public IDictionary<string, object?> Properties { get; set; } = new Dictionary<string, object?>();
 012    public ExecuteActivityDelegate ExecuteHandler { get; set; } = _ => ValueTask.CompletedTask;
 13
 014    protected override ValueTask ExecuteAsync(ActivityExecutionContext context) => ExecuteHandler(context);
 15}