< Summary

Information
Class: Elsa.Extensions.ModuleExtensions
Assembly: Elsa.Workflows.Api
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Extensions/ModuleExtensions.cs
Line coverage
50%
Covered lines: 2
Uncovered lines: 2
Coverable lines: 4
Total lines: 29
Line coverage: 50%
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
UseWorkflowsApi(...)100%11100%
UseRealTimeWorkflows(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Api/Extensions/ModuleExtensions.cs

#LineLine coverage
 1using Elsa.Features.Services;
 2using Elsa.Workflows.Api.Features;
 3
 4// ReSharper disable once CheckNamespace
 5namespace Elsa.Extensions;
 6
 7/// <summary>
 8/// Provides extensions to <see cref="IModule"/>.
 9/// </summary>
 10public static class ModuleExtensions
 11{
 12    /// <summary>
 13    /// Configures the workflows API feature.
 14    /// </summary>
 15    public static IModule UseWorkflowsApi(this IModule module, Action<WorkflowsApiFeature>? configure = default)
 16    {
 117        module.Configure(configure);
 118        return module;
 19    }
 20
 21    /// <summary>
 22    /// Configures the real time workflow updates feature
 23    /// </summary>
 24    public static IModule UseRealTimeWorkflows(this IModule module, Action<RealTimeWorkflowUpdatesFeature>? configure = 
 25    {
 026        module.Configure(configure);
 027        return module;
 28    }
 29}