-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCodeGenPropertyAttribute.cs
49 lines (41 loc) · 1.54 KB
/
CodeGenPropertyAttribute.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/OnRamp
using System;
namespace OnRamp.Config
{
/// <summary>
/// Represents the <i>code-generation</i> property configuration.
/// </summary>
/// <param name="category">The grouping category.</param>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CodeGenPropertyAttribute(string category) : Attribute
{
/// <summary>
/// Gets or sets the category.
/// </summary>
public string Category { get; } = category ?? throw new ArgumentNullException(nameof(category));
/// <summary>
/// Gets or sets the title.
/// </summary>
public string? Title { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
public string? Description { get; set; }
/// <summary>
/// Indicates whether the property is mandatory.
/// </summary>
public bool IsMandatory { get; set; }
/// <summary>
/// Indicates whether the property is considered important.
/// </summary>
public bool IsImportant { get; set; }
/// <summary>
/// Indicates whether the property is considered unique within the context of the owning collection.
/// </summary>
public bool IsUnique { get; set; }
/// <summary>
/// Gets or sets the list of option values.
/// </summary>
public string[]? Options { get; set; }
}
}