< Summary

Information
Class: Elsa.Workflows.Management.WorkflowDefinitionServiceExtensions
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Extensions/WorkflowDefinitionExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 43
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 4
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
FindWorkflowDefinitionAsync(...)100%210%
FindWorkflowDefinitionAsync(...)100%210%
FindWorkflowAsync()0%620%
FindWorkflowAsync()0%620%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Extensions/WorkflowDefinitionExtensions.cs

#LineLine coverage
 1using Elsa.Common.Models;
 2using Elsa.Workflows.Activities;
 3using Elsa.Workflows.Management.Entities;
 4
 5namespace Elsa.Workflows.Management;
 6
 7/// <summary>
 8/// Extension methods for <see cref="IWorkflowDefinitionService"/>.
 9/// </summary>
 10public static class WorkflowDefinitionServiceExtensions
 11{
 12    /// <summary>
 13    /// Looks for a <see cref="WorkflowDefinition"/> by the specified definition ID and <see cref="VersionOptions"/>.
 14    /// </summary>
 15    public static Task<WorkflowDefinition?> FindWorkflowDefinitionAsync(this IWorkflowDefinitionService service, string 
 16    {
 017        return service.FindWorkflowDefinitionAsync(definitionId, versionOptions, cancellationToken: cancellationToken);
 18    }
 19
 20    /// <summary>
 21    /// Looks for a <see cref="WorkflowDefinition"/> by the specified version ID.
 22    /// </summary>
 23    public static Task<WorkflowDefinition?> FindWorkflowDefinitionAsync(this IWorkflowDefinitionService service, string 
 24    {
 025        return service.FindWorkflowDefinitionAsync(definitionVersionId, cancellationToken: cancellationToken);
 26    }
 27
 28    /// <summary>
 29    /// Looks for a <see cref="Workflow"/> by the specified definition ID and <see cref="VersionOptions"/>.
 30    /// </summary>
 31    public static async Task<Workflow?> FindWorkflowAsync(this IWorkflowDefinitionService service, string definitionId, 
 32    {
 033        return (await service.FindWorkflowGraphAsync(definitionId, versionOptions, cancellationToken: cancellationToken)
 034    }
 35
 36    /// <summary>
 37    /// Looks for a <see cref="Workflow"/> by the specified version ID.
 38    /// </summary>
 39    public static async Task<Workflow?> FindWorkflowAsync(this IWorkflowDefinitionService service, string definitionVers
 40    {
 041        return (await service.FindWorkflowGraphAsync(definitionVersionId, cancellationToken: cancellationToken))?.Workfl
 042    }
 43}