| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Api.Client.Resources.Scripting.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents a descriptor for an expression. |
| | | 7 | | /// </summary> |
| | | 8 | | public class ExpressionDescriptor |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new instance of the <see cref="ExpressionDescriptor"/> class. |
| | | 12 | | /// </summary> |
| | | 13 | | [JsonConstructor] |
| | 0 | 14 | | public ExpressionDescriptor() |
| | | 15 | | { |
| | 0 | 16 | | } |
| | | 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> |
| | 0 | 23 | | public ExpressionDescriptor(string type, string displayName) |
| | | 24 | | { |
| | 0 | 25 | | Type = type; |
| | 0 | 26 | | DisplayName = displayName; |
| | 0 | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Gets or sets the expression type. |
| | | 31 | | /// </summary> |
| | 0 | 32 | | public string Type { get; set; } = default!; |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// Gets or sets the display name of the expression type. |
| | | 36 | | /// </summary> |
| | 0 | 37 | | public string DisplayName { get; set; } = default!; |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// Gets or sets whether the expression value is serializable. |
| | | 41 | | /// </summary> |
| | 0 | 42 | | public bool IsSerializable { get; set; } = true; |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// Gets or sets whether the expression type is browsable. |
| | | 46 | | /// </summary> |
| | 0 | 47 | | public bool IsBrowsable { get; set; } = true; |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Gets or sets the expression type properties. |
| | | 51 | | /// </summary> |
| | 0 | 52 | | public IDictionary<string, string> Properties { get; set; } = new Dictionary<string, string>(); |
| | | 53 | | } |