| | | 1 | | using System.Reflection; |
| | | 2 | | using System.Text.Json.Serialization; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Workflows.Models; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// A descriptor of an activity's output property. |
| | | 8 | | /// </summary> |
| | | 9 | | public class OutputDescriptor : PropertyDescriptor |
| | | 10 | | { |
| | | 11 | | /// <inheritdoc /> |
| | | 12 | | [JsonConstructor] |
| | 192 | 13 | | public OutputDescriptor() |
| | | 14 | | { |
| | 192 | 15 | | } |
| | | 16 | | |
| | | 17 | | /// <inheritdoc /> |
| | 4468 | 18 | | public OutputDescriptor( |
| | 4468 | 19 | | string name, |
| | 4468 | 20 | | string displayName, |
| | 4468 | 21 | | Type type, |
| | 4468 | 22 | | Func<IActivity, object?> valueGetter, |
| | 4468 | 23 | | Action<IActivity, object?> valueSetter, |
| | 4468 | 24 | | PropertyInfo? propertyInfo = default, |
| | 4468 | 25 | | string? description = default, |
| | 4468 | 26 | | bool? isBrowsable = default, |
| | 4468 | 27 | | bool? isSerializable = default) |
| | | 28 | | { |
| | 4468 | 29 | | Name = name; |
| | 4468 | 30 | | DisplayName = displayName; |
| | 4468 | 31 | | Type = type; |
| | 4468 | 32 | | ValueGetter = valueGetter; |
| | 4468 | 33 | | ValueSetter = valueSetter; |
| | 4468 | 34 | | Description = description; |
| | 4468 | 35 | | IsBrowsable = isBrowsable; |
| | 4468 | 36 | | IsSerializable = isSerializable; |
| | 4468 | 37 | | PropertyInfo = propertyInfo; |
| | 4468 | 38 | | } |
| | | 39 | | } |