| | | 1 | | using Elsa.Api.Client.Resources.ActivityDescriptors.Enums; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Api.Client.Resources.ActivityDescriptors.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// A descriptor of an activity type. |
| | | 7 | | /// </summary> |
| | | 8 | | public record ActivityDescriptor |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// The fully qualified name of the activity type. |
| | | 12 | | /// </summary> |
| | 0 | 13 | | public string TypeName { get; init; } = default!; |
| | | 14 | | |
| | | 15 | | /// <summary> |
| | | 16 | | /// The namespace of the activity type. |
| | | 17 | | /// </summary> |
| | 0 | 18 | | public string Namespace { get; init; } = default!; |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// The name of the activity type. |
| | | 22 | | /// </summary> |
| | 0 | 23 | | public string Name { get; init; } = default!; |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// The version of the activity type. |
| | | 27 | | /// </summary> |
| | 0 | 28 | | public int Version { get; init; } |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// The category of the activity type. |
| | | 32 | | /// </summary> |
| | 0 | 33 | | public string Category { get; init; } = default!; |
| | | 34 | | |
| | | 35 | | /// <summary> |
| | | 36 | | /// The display name of the activity type. |
| | | 37 | | /// </summary> |
| | 0 | 38 | | public string? DisplayName { get; init; } |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// The description of the activity type. |
| | | 42 | | /// </summary> |
| | 0 | 43 | | public string? Description { get; init; } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// The input properties of the activity type. |
| | | 47 | | /// </summary> |
| | 0 | 48 | | public IReadOnlyCollection<InputDescriptor> Inputs { get; init; } = new List<InputDescriptor>(); |
| | | 49 | | |
| | | 50 | | /// <summary> |
| | | 51 | | /// The output properties of the activity type. |
| | | 52 | | /// </summary> |
| | 0 | 53 | | public IReadOnlyCollection<OutputDescriptor> Outputs { get; init; } = new List<OutputDescriptor>(); |
| | | 54 | | |
| | | 55 | | /// <summary> |
| | | 56 | | /// The kind of activity. |
| | | 57 | | /// </summary> |
| | 0 | 58 | | public ActivityKind Kind { get; set; } = ActivityKind.Action; |
| | | 59 | | |
| | | 60 | | /// <summary> |
| | | 61 | | /// The ports of the activity type. |
| | | 62 | | /// </summary> |
| | 0 | 63 | | public IReadOnlyCollection<Port> Ports { get; init; } = new List<Port>(); |
| | | 64 | | |
| | | 65 | | /// <summary> |
| | | 66 | | /// The custom properties of the activity type. |
| | | 67 | | /// </summary> |
| | 0 | 68 | | public IReadOnlyDictionary<string, object> CustomProperties { get; set; } = new Dictionary<string, object>(); |
| | | 69 | | |
| | | 70 | | /// <summary> |
| | | 71 | | /// The properties to set when constructing an activity in the designer. |
| | | 72 | | /// </summary> |
| | 0 | 73 | | public IDictionary<string, object> ConstructionProperties { get; set; } = new Dictionary<string, object>(); |
| | | 74 | | |
| | | 75 | | /// <summary> |
| | | 76 | | /// A value indicating whether this activity is a container of child activities. |
| | | 77 | | /// </summary> |
| | 0 | 78 | | public bool IsContainer { get; set; } |
| | | 79 | | |
| | | 80 | | /// <summary> |
| | | 81 | | /// Whether this activity type is selectable from activity pickers. |
| | | 82 | | /// </summary> |
| | 0 | 83 | | public bool IsBrowsable { get; set; } |
| | | 84 | | |
| | | 85 | | /// <summary> |
| | | 86 | | /// Whether this activity type is a start activity. |
| | | 87 | | /// </summary> |
| | 0 | 88 | | public bool IsStart { get; set; } |
| | | 89 | | |
| | | 90 | | /// <summary> |
| | | 91 | | /// Whether this activity type is a terminal activity. |
| | | 92 | | /// </summary> |
| | 0 | 93 | | public bool IsTerminal { get; set; } |
| | | 94 | | } |