| | | 1 | | using JetBrains.Annotations; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Features.Models; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Represents a feature descriptor. |
| | | 7 | | /// </summary> |
| | | 8 | | [PublicAPI] |
| | | 9 | | public class FeatureDescriptor |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Initializes a new instance of the <see cref="FeatureDescriptor"/> class. |
| | | 13 | | /// </summary> |
| | 0 | 14 | | public FeatureDescriptor() |
| | | 15 | | { |
| | 0 | 16 | | } |
| | | 17 | | |
| | | 18 | | /// <summary> |
| | | 19 | | /// Initializes a new instance of the <see cref="FeatureDescriptor"/> class. |
| | | 20 | | /// </summary> |
| | | 21 | | /// <param name="name">The name of the feature.</param> |
| | | 22 | | /// <param name="ns">The namespace of the feature.</param> |
| | | 23 | | /// <param name="displayName">The display name for the feature.</param> |
| | | 24 | | /// <param name="description">The description of the feature.</param> |
| | 44 | 25 | | public FeatureDescriptor(string name, string ns, string displayName, string? description = default) |
| | | 26 | | { |
| | 44 | 27 | | Name = name; |
| | 44 | 28 | | Namespace = ns; |
| | 44 | 29 | | DisplayName = displayName; |
| | 44 | 30 | | Description = description ?? ""; |
| | 44 | 31 | | } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets or sets the name of the feature. |
| | | 35 | | /// </summary> |
| | 88 | 36 | | public string Name { get; set; } = default!; |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Gets or sets the namespace of the feature. |
| | | 40 | | /// </summary> |
| | 88 | 41 | | public string Namespace { get; set; } = default!; |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets the full name of the feature. |
| | | 45 | | /// </summary> |
| | 44 | 46 | | public string FullName => $"{Namespace}.{Name}"; |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// The display name for the feature. |
| | | 50 | | /// </summary> |
| | 44 | 51 | | public string DisplayName { get; set; } = default!; |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// The description of the feature. |
| | | 55 | | /// </summary> |
| | 88 | 56 | | public string Description { get; set; } = ""; |
| | | 57 | | } |