< Summary

Information
Class: Elsa.Workflows.Models.PropertyDescriptor
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/PropertyDescriptor.cs
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 69
Line coverage: 100%
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
get_Name()100%11100%
get_Type()100%11100%
get_DisplayName()100%11100%
get_Description()100%11100%
get_Order()100%11100%
get_IsBrowsable()100%11100%
get_IsSerializable()100%11100%
get_IsSynthetic()100%11100%
get_ValueGetter()100%11100%
get_ValueSetter()100%11100%
get_PropertyInfo()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/PropertyDescriptor.cs

#LineLine coverage
 1using System.Reflection;
 2using System.Text.Json.Serialization;
 3
 4namespace Elsa.Workflows.Models;
 5
 6/// <summary>
 7/// A base type for <see cref="InputDescriptor"/> and <see cref="OutputDescriptor"/>.
 8/// </summary>
 9public abstract class PropertyDescriptor
 10{
 11    /// <summary>
 12    /// The name.
 13    /// </summary>
 6642214    public string Name { get; set; } = null!;
 15
 16    /// <summary>
 17    /// The .NET type.
 18    /// </summary>
 19    [JsonPropertyName("typeName")]
 2215720    public Type Type { get; set; } = null!;
 21
 22    /// <summary>
 23    /// The user friendly name of the input. Used by UI tools.
 24    /// </summary>
 2206125    public string? DisplayName { get; set; }
 26
 27    /// <summary>
 28    /// The user friendly description of the input. Used by UI tools.
 29    /// </summary>
 2206130    public string? Description { get; set; }
 31
 32    /// <summary>
 33    /// The order in which this input should be displayed by UI tools.
 34    /// </summary>
 1733735    public float Order { get; set; }
 36
 37    /// <summary>
 38    /// True if this property should be displayed by UI tools, false otherwise.
 39    /// </summary>
 4386640    public bool? IsBrowsable { get; set; } = true;
 41
 42    /// <summary>
 43    /// True if this property can be serialized.
 44    /// </summary>
 3240845    public bool? IsSerializable { get; set; }
 46
 47    /// <summary>
 48    /// True if this input property is synthetic, which means it does not exist physically on the activity's .NET type.
 49    /// </summary>
 2744350    public bool IsSynthetic { get; set; }
 51
 52    /// <summary>
 53    /// Returns the value of the input property for the specified activity.
 54    /// </summary>
 55    [JsonIgnore]
 4300856    public Func<IActivity, object?> ValueGetter { get; set; } = null!;
 57
 58    /// <summary>
 59    /// Sets the value of the input property for the specified activity.
 60    /// </summary>
 61    [JsonIgnore]
 2207062    public Action<IActivity, object?> ValueSetter { get; set; } = null!;
 63
 64    /// <summary>
 65    /// The source of the property, if any.
 66    /// </summary>
 67    [JsonIgnore]
 2774768    public PropertyInfo? PropertyInfo { get; set; }
 69}