< Summary

Information
Class: Elsa.Workflows.ActivationValidators.AllowAlwaysStrategy
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/ActivationValidators/AllowAlwaysStrategy.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
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
GetAllowActivationAsync(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/ActivationValidators/AllowAlwaysStrategy.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations;
 2
 3namespace Elsa.Workflows.ActivationValidators;
 4
 5/// <summary>
 6/// Always allow the creation of a new workflow instance.
 7/// </summary>
 8[Display(Name = "Always", Description = "Always allow the creation of a new workflow instance.")]
 9public class AllowAlwaysStrategy : IWorkflowActivationStrategy
 10{
 11    /// <summary>
 12    /// Always allow creating a new instance.
 13    /// </summary>
 014    public ValueTask<bool> GetAllowActivationAsync(WorkflowInstantiationStrategyContext context) => new(true);
 15}