< Summary

Information
Class: Elsa.Features.Models.FeatureDescriptor
Assembly: Elsa.Features
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Features/Models/FeatureDescriptor.cs
Line coverage
84%
Covered lines: 11
Uncovered lines: 2
Coverable lines: 13
Total lines: 57
Line coverage: 84.6%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
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%22100%
get_Name()100%11100%
get_Namespace()100%11100%
get_FullName()100%11100%
get_DisplayName()100%11100%
get_Description()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/common/Elsa.Features/Models/FeatureDescriptor.cs

#LineLine coverage
 1using JetBrains.Annotations;
 2
 3namespace Elsa.Features.Models;
 4
 5/// <summary>
 6/// Represents a feature descriptor.
 7/// </summary>
 8[PublicAPI]
 9public class FeatureDescriptor
 10{
 11    /// <summary>
 12    /// Initializes a new instance of the <see cref="FeatureDescriptor"/> class.
 13    /// </summary>
 014    public FeatureDescriptor()
 15    {
 016    }
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="FeatureDescriptor"/> class.
 20    /// </summary>
 21    /// <param name="name">The name of the feature.</param>
 22    /// <param name="ns">The namespace of the feature.</param>
 23    /// <param name="displayName">The display name for the feature.</param>
 24    /// <param name="description">The description of the feature.</param>
 4425    public FeatureDescriptor(string name, string ns, string displayName, string? description = default)
 26    {
 4427        Name = name;
 4428        Namespace = ns;
 4429        DisplayName = displayName;
 4430        Description = description ?? "";
 4431    }
 32
 33    /// <summary>
 34    /// Gets or sets the name of the feature.
 35    /// </summary>
 8836    public string Name { get; set; } = default!;
 37
 38    /// <summary>
 39    /// Gets or sets the namespace of the feature.
 40    /// </summary>
 8841    public string Namespace { get; set; } = default!;
 42
 43    /// <summary>
 44    /// Gets the full name of the feature.
 45    /// </summary>
 4446    public string FullName => $"{Namespace}.{Name}";
 47
 48    /// <summary>
 49    /// The display name for the feature.
 50    /// </summary>
 4451    public string DisplayName { get; set; } = default!;
 52
 53    /// <summary>
 54    /// The description of the feature.
 55    /// </summary>
 8856    public string Description { get; set; } = "";
 57}