< Summary

Information
Class: Elsa.Workflows.Management.Models.VariableDescriptor
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Models/VariableDescriptor.cs
Line coverage
40%
Covered lines: 2
Uncovered lines: 3
Coverable lines: 5
Total lines: 23
Line coverage: 40%
Branch coverage
0%
Covered branches: 0
Total branches: 6
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Type()100%11100%
Equals(...)0%4260%
GetHashCode(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/Models/VariableDescriptor.cs

#LineLine coverage
 1namespace Elsa.Workflows.Management.Models;
 2
 3/// <summary>
 4/// Represents a description of a .NET type that can be used as a workflow variable.
 5/// </summary>
 19646public record VariableDescriptor(Type Type, string Category, string? Description)
 7{
 8    public class VariableDescriptorComparer : IEqualityComparer<VariableDescriptor>
 9    {
 10        public bool Equals(VariableDescriptor? x, VariableDescriptor? y)
 11        {
 012            if (ReferenceEquals(x, y)) return true;
 013            if (x is null || y is null) return false;
 14
 015            return x.Type == y.Type;
 16        }
 17
 18        public int GetHashCode(VariableDescriptor obj)
 19        {
 2920            return obj.Type.GetHashCode();
 21        }
 22    }
 23}