< Summary

Information
Class: Elsa.Api.Client.Resources.Scripting.Models.ExpressionDescriptor
Assembly: Elsa.Api.Client
File(s): /home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/Scripting/Models/ExpressionDescriptor.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 53
Line coverage: 0%
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%210%
get_Type()100%210%
get_DisplayName()100%210%
get_IsSerializable()100%210%
get_IsBrowsable()100%210%
get_Properties()100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/clients/Elsa.Api.Client/Resources/Scripting/Models/ExpressionDescriptor.cs

#LineLine coverage
 1using System.Text.Json.Serialization;
 2
 3namespace Elsa.Api.Client.Resources.Scripting.Models;
 4
 5/// <summary>
 6/// Represents a descriptor for an expression.
 7/// </summary>
 8public class ExpressionDescriptor
 9{
 10    /// <summary>
 11    /// Initializes a new instance of the <see cref="ExpressionDescriptor"/> class.
 12    /// </summary>
 13    [JsonConstructor]
 014    public ExpressionDescriptor()
 15    {
 016    }
 17
 18    /// <summary>
 19    /// Initializes a new instance of the <see cref="ExpressionDescriptor"/> class.
 20    /// </summary>
 21    /// <param name="type">The expression type.</param>
 22    /// <param name="displayName">The display name of the expression type.</param>
 023    public ExpressionDescriptor(string type, string displayName)
 24    {
 025        Type = type;
 026        DisplayName = displayName;
 027    }
 28
 29    /// <summary>
 30    /// Gets or sets the expression type.
 31    /// </summary>
 032    public string Type { get; set; } = default!;
 33
 34    /// <summary>
 35    /// Gets or sets the display name of the expression type.
 36    /// </summary>
 037    public string DisplayName { get; set; } = default!;
 38
 39    /// <summary>
 40    /// Gets or sets whether the expression value is serializable.
 41    /// </summary>
 042    public bool IsSerializable { get; set; } = true;
 43
 44    /// <summary>
 45    /// Gets or sets whether the expression type is browsable.
 46    /// </summary>
 047    public bool IsBrowsable { get; set; } = true;
 48
 49    /// <summary>
 50    /// Gets or sets the expression type properties.
 51    /// </summary>
 052    public IDictionary<string, string> Properties { get; set; } = new Dictionary<string, string>();
 53}