< Summary

Information
Class: Elsa.Workflows.Attributes.ActivityAttribute
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Attributes/ActivityAttribute.cs
Line coverage
81%
Covered lines: 22
Uncovered lines: 5
Coverable lines: 27
Total lines: 42
Line coverage: 81.4%
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
.ctor()100%11100%
.ctor(...)100%11100%
.ctor(...)100%210%
.ctor(...)100%11100%
get_Namespace()100%11100%
get_Type()100%11100%
get_Version()100%11100%
get_Description()100%11100%
get_DisplayName()100%11100%
get_Category()100%11100%
get_Kind()100%11100%
get_RunAsynchronously()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Attributes/ActivityAttribute.cs

#LineLine coverage
 1namespace Elsa.Workflows.Attributes;
 2
 3[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Method)]
 4public class ActivityAttribute : Attribute
 5{
 96    public ActivityAttribute()
 7    {
 8        // Default constructor.
 99    }
 10
 15934211    public ActivityAttribute(string @namespace, string? category, string? description = null)
 12    {
 15934213        Namespace = @namespace;
 15934214        Description = description;
 15934215        Category = category;
 15934216    }
 17
 018    public ActivityAttribute(string @namespace, string? description = null)
 19    {
 020        Namespace = @namespace;
 021        Description = description;
 022        Category = @namespace;
 023    }
 24
 59625    public ActivityAttribute(string @namespace, string? type, int version = 1, string? description = null, string? categ
 26    {
 59627        Namespace = @namespace;
 59628        Type = type;
 59629        Version = version;
 59630        Description = description;
 59631        Category = category;
 59632    }
 33
 23546034    public string? Namespace { get; set; }
 7610535    public string? Type { get; set; }
 16797236    public int Version { get; set; } = 1;
 16738937    public string? Description { get; set; }
 2223338    public string? DisplayName { get; set; }
 16722039    public string? Category { get; set; }
 1909940    public ActivityKind Kind { get; set; } = ActivityKind.Action;
 941    public bool RunAsynchronously { get; set; }
 42}