< 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
46%
Covered lines: 12
Uncovered lines: 14
Coverable lines: 26
Total lines: 41
Line coverage: 46.1%
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%210%
.ctor(...)100%11100%
.ctor(...)100%210%
.ctor(...)100%210%
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%

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)]
 4public class ActivityAttribute : Attribute
 5{
 06    public ActivityAttribute()
 7    {
 8        // Default constructor.
 09    }
 10
 9725611    public ActivityAttribute(string @namespace, string? category, string? description = default)
 12    {
 9725613        Namespace = @namespace;
 9725614        Description = description;
 9725615        Category = category;
 9725616    }
 17
 018    public ActivityAttribute(string @namespace, string? description = default)
 19    {
 020        Namespace = @namespace;
 021        Description = description;
 022        Category = @namespace;
 023    }
 24
 025    public ActivityAttribute(string @namespace, string? type, int version = 1, string? description = default, string? ca
 26    {
 027        Namespace = @namespace;
 028        Type = type;
 029        Version = version;
 030        Description = description;
 031        Category = category;
 032    }
 33
 14440034    public string? Namespace { get; set; }
 4714035    public string? Type { get; set; }
 10859336    public int Version { get; set; } = 1;
 10859737    public string? Description { get; set; }
 2259138    public string? DisplayName { get; set; }
 10834039    public string? Category { get; set; }
 1985540    public ActivityKind Kind { get; set; } = ActivityKind.Action;
 41}