< Summary

Information
Class: Elsa.Workflows.Models.InputDescriptor
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Models/InputDescriptor.cs
Line coverage
100%
Covered lines: 58
Uncovered lines: 0
Coverable lines: 58
Total lines: 120
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
.ctor()100%11100%
.ctor(...)100%11100%
get_IsWrapped()100%11100%
get_UIHint()100%11100%
get_Category()100%11100%
get_DefaultValue()100%11100%
get_DefaultSyntax()100%11100%
get_IsReadOnly()100%11100%
get_IsSensitive()100%11100%
get_StorageDriverType()100%11100%
get_AutoEvaluate()100%11100%
get_EvaluatorType()100%11100%
get_UISpecifications()100%11100%

File(s)

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

#LineLine coverage
 1using System.Reflection;
 2
 3namespace Elsa.Workflows.Models;
 4
 5/// <summary>
 6/// A descriptor of an activity's input property.
 7/// </summary>
 8public class InputDescriptor : PropertyDescriptor
 9{
 10    /// <inheritdoc />
 67011    public InputDescriptor()
 12    {
 67013    }
 14
 15    /// <inheritdoc />
 2295616    public InputDescriptor(
 2295617        string name,
 2295618        Type type,
 2295619        Func<IActivity, object?> valueGetter,
 2295620        Action<IActivity, object?> valueSetter,
 2295621        bool isWrapped,
 2295622        string uiHint,
 2295623        string displayName,
 2295624        string? description = null,
 2295625        string? category = null,
 2295626        float order = 0,
 2295627        object? defaultValue = null,
 2295628        string? defaultSyntax = "Literal",
 2295629        bool isReadOnly = false,
 2295630        bool isBrowsable = true,
 2295631        bool isSerializable = true,
 2295632        bool isSynthetic = false,
 2295633        bool autoEvaluate = true,
 2295634        Type? evaluatorType = null,
 2295635        Type? storageDriverType = null,
 2295636        PropertyInfo? propertyInfo = null,
 2295637        IDictionary<string, object>? uiSpecifications = null
 2295638    )
 39    {
 2295640        Name = name;
 2295641        Type = type;
 2295642        ValueGetter = valueGetter;
 2295643        ValueSetter = valueSetter;
 2295644        IsWrapped = isWrapped;
 2295645        UIHint = uiHint;
 2295646        DisplayName = displayName;
 2295647        Description = description;
 2295648        Category = category;
 2295649        Order = order;
 2295650        DefaultValue = defaultValue;
 2295651        DefaultSyntax = defaultSyntax;
 2295652        IsReadOnly = isReadOnly;
 2295653        AutoEvaluate = autoEvaluate;
 2295654        EvaluatorType = evaluatorType;
 2295655        StorageDriverType = storageDriverType;
 2295656        IsSynthetic = isSynthetic;
 2295657        IsBrowsable = isBrowsable;
 2295658        IsSerializable = isSerializable;
 2295659        PropertyInfo = propertyInfo;
 2295660        UISpecifications = uiSpecifications;
 2295661    }
 62
 63    /// <summary>
 64    /// True if the property is wrapped with an <see cref="Input{T}"/> type, false otherwise.
 65    /// </summary>
 8540066    public bool IsWrapped { get; set; }
 67
 68    /// <summary>
 69    /// A string value that hints at what UI control might be used to render in a UI tool.
 70    /// </summary>
 4590071    public string UIHint { get; set; } = null!;
 72
 73    /// <summary>
 74    /// The category to which this input belongs. Can be used by UI to e.g. render different inputs in different tabs.
 75    /// </summary>
 2362276    public string? Category { get; set; }
 77
 78    /// <summary>
 79    /// The default value.
 80    /// </summary>
 2973181    public object? DefaultValue { get; set; }
 82
 83    /// <summary>
 84    /// The default syntax.
 85    /// </summary>
 2295686    public string? DefaultSyntax { get; set; }
 87
 88    /// <summary>
 89    /// True if the input is readonly, false otherwise.
 90    /// </summary>
 2295691    public bool? IsReadOnly { get; set; }
 92
 93    /// <summary>
 94    /// Gets or sets a value indicating whether this input can contain secrets.
 95    /// When set to true, the input will be treated as a secret and will be encrypted, masked or otherwise protected, de
 96    /// </summary>
 2972897    public bool IsSensitive { get; set; }
 98
 99    /// <summary>
 100    /// The storage driver type to use for persistence.
 101    /// If no driver is specified, the referenced memory block will remain in memory for as long as the expression execu
 102    /// </summary>
 23111103    public Type? StorageDriverType { get; set; }
 104
 105    /// <summary>
 106    /// True if the expression should be evaluated automatically, false otherwise. Defaults to true.
 107    /// </summary>
 54486108    public bool AutoEvaluate { get; set; } = true;
 109
 110    /// <summary>
 111    /// Specifies the type of a custom evaluator to use for evaluating the input property value.
 112    /// The evaluator type determines how the value for the property is resolved at runtime.
 113    /// </summary>
 28045114    public Type? EvaluatorType { get; set; }
 115
 116    /// <summary>
 117    /// A dictionary of UI specifications to be used by the UI.
 118    /// </summary>
 22956119    public IDictionary<string, object>? UISpecifications { get; set; }
 120}