< 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
55%
Covered lines: 15
Uncovered lines: 12
Coverable lines: 27
Total lines: 42
Line coverage: 55.5%
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%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%
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{
 426    public ActivityAttribute()
 7    {
 8        // Default constructor.
 429    }
 10
 14470811    public ActivityAttribute(string @namespace, string? category, string? description = null)
 12    {
 14470813        Namespace = @namespace;
 14470814        Description = description;
 14470815        Category = category;
 14470816    }
 17
 018    public ActivityAttribute(string @namespace, string? description = null)
 19    {
 020        Namespace = @namespace;
 021        Description = description;
 022        Category = @namespace;
 023    }
 24
 025    public ActivityAttribute(string @namespace, string? type, int version = 1, string? description = null, string? categ
 26    {
 027        Namespace = @namespace;
 028        Type = type;
 029        Version = version;
 030        Description = description;
 031        Category = category;
 032    }
 33
 21418034    public string? Namespace { get; set; }
 6942635    public string? Type { get; set; }
 15747536    public int Version { get; set; } = 1;
 15752137    public string? Description { get; set; }
 2902538    public string? DisplayName { get; set; }
 15720639    public string? Category { get; set; }
 2491040    public ActivityKind Kind { get; set; } = ActivityKind.Action;
 4241    public bool RunAsynchronously { get; set; }
 42}