< Summary

Information
Class: Elsa.Extensions.WorkflowsFeatureExtensions
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/WorkflowsFeatureExtensions.cs
Line coverage
22%
Covered lines: 2
Uncovered lines: 7
Coverable lines: 9
Total lines: 35
Line coverage: 22.2%
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
WithDefaultWorkflowExecutionPipeline(...)100%11100%
WithBackgroundActivityExecutionPipeline(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/WorkflowsFeatureExtensions.cs

#LineLine coverage
 1
 2
 3
 4
 5using Elsa.Workflows.Middleware.Activities;
 6// ReSharper disable once CheckNamespace
 7using Elsa.Workflows.Features;
 8
 9// ReSharper disable once CheckNamespace
 10namespace Elsa.Extensions;
 11
 12/// <summary>
 13/// Adds an extension method to the <see cref="WorkflowsFeature"/> that installs a default workflow runtime execution pi
 14/// </summary>
 15public static class WorkflowsFeatureExtensions
 16{
 17     /// <summary>
 18     /// Installs a default workflow runtime execution pipeline.
 19     /// </summary>
 20     public static WorkflowsFeature WithDefaultWorkflowExecutionPipeline(this WorkflowsFeature workflowsFeature) =>
 17221         workflowsFeature.WithWorkflowExecutionPipeline(pipeline =>
 61122             pipeline.UseDefaultPipeline());
 23
 24     /// <summary>
 25     /// Installs an activity invoker that can run activities asynchronously in the background.
 26     /// </summary>
 27     public static WorkflowsFeature WithBackgroundActivityExecutionPipeline(this WorkflowsFeature workflowsFeature) =>
 028          workflowsFeature.WithActivityExecutionPipeline(pipeline =>
 029              pipeline
 030                  .UseExceptionHandling()
 031                  .UseLogPersistenceModeEvaluation()
 032                  .UseExecutionLogging()
 033                  .UseNotifications()
 034                  .UseBackgroundActivityInvoker());
 35}