-
Notifications
You must be signed in to change notification settings - Fork 0
/
CliAttribute.cs
46 lines (39 loc) · 1.04 KB
/
CliAttribute.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
using System;
namespace TeleScope.UI.Cli.Options
{
/// <summary>
/// Attribute class to add names for command line options.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class CliAttribute : Attribute
{
// -- properties
/// <summary>
/// Gets or sets the short term of the command line option.
/// Do not use any special characters, pre- or suffixes.
/// </summary>
public string Short { get; set; }
/// <summary>
/// Gets or sets the long term of the command line option.
/// Do not use any special characters, pre- or suffixes.
/// </summary>
public string Long { get; set; }
// -- constructors
/// <summary>
/// The default empty constructor.
/// </summary>
public CliAttribute()
{
}
/// <summary>
/// The constructor sets the properties Short and Long of the attribute.
/// </summary>
/// <param name="shortTerm"></param>
/// <param name="longTerm"></param>
public CliAttribute(string shortTerm, string longTerm) : this()
{
Short = shortTerm;
Long = longTerm;
}
}
}