< Summary

Information
Class: Elsa.Workflows.Runtime.Contracts.WorkflowDispatcherExtensions
Assembly: Elsa.Workflows.Runtime
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Runtime/Extensions/WorkflowDispatcherExtensions.cs
Line coverage
25%
Covered lines: 1
Uncovered lines: 3
Coverable lines: 4
Total lines: 43
Line coverage: 25%
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
DispatchAsync(...)100%11100%
DispatchAsync(...)100%210%
DispatchAsync(...)100%210%
DispatchAsync(...)100%210%

File(s)

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

#LineLine coverage
 1using Elsa.Workflows.Runtime.Requests;
 2using Elsa.Workflows.Runtime.Responses;
 3
 4// ReSharper disable once CheckNamespace
 5namespace Elsa.Workflows.Runtime.Contracts;
 6
 7/// <summary>
 8/// Provides a set of extension methods for <see cref="IWorkflowDispatcher"/>.
 9/// </summary>
 10public static class WorkflowDispatcherExtensions
 11{
 12    /// <summary>
 13    /// Dispatches a request to execute the specified workflow definition.
 14    /// </summary>
 15    public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchWork
 16    {
 417        return workflowDispatcher.DispatchAsync(request, new(), cancellationToken);
 18    }
 19
 20    /// <summary>
 21    /// Dispatches a request to execute the specified workflow instance.
 22    /// </summary>
 23    public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchWork
 24    {
 025        return workflowDispatcher.DispatchAsync(request, new(), cancellationToken);
 26    }
 27
 28    /// <summary>
 29    /// Starts all workflows and resumes existing workflow instances based on the specified activity type and bookmark p
 30    /// </summary>
 31    public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchTrig
 32    {
 033        return workflowDispatcher.DispatchAsync(request, new(), cancellationToken);
 34    }
 35
 36    /// <summary>
 37    /// Resumes the workflow waiting for the specified bookmark.
 38    /// </summary>
 39    public static Task<DispatchWorkflowResponse> DispatchAsync(this IWorkflowDispatcher workflowDispatcher, DispatchResu
 40    {
 041        return workflowDispatcher.DispatchAsync(request, new(), cancellationToken);
 42    }
 43}