-
Notifications
You must be signed in to change notification settings - Fork 479
Expand file tree
/
Copy pathOptions_With_Empty_Enum_First_Element.cs
More file actions
37 lines (33 loc) · 1.2 KB
/
Options_With_Empty_Enum_First_Element.cs
File metadata and controls
37 lines (33 loc) · 1.2 KB
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
using CommandLine.Text;
using System.Collections.Generic;
namespace CommandLine.Tests.Fakes
{
public enum EntityType
{
T0,
T1,
T2
}
public class Options_With_Empty_Enum_First_Element
{
[Option('t', "type", HelpText = "My entity")]
public EntityType BaseEnum { get; set; }
[Option('v', "value")]
public int Value { get; set; }
[Option('d')]
public double Double { get; set; }
[Option('b')]
public bool Bool { get; set; }
[Usage(ApplicationAlias = "test.exe")]
public static IEnumerable<Example> Examples
{
get
{
yield return new Example("1", new Options_With_Empty_Enum_First_Element { BaseEnum = EntityType.T0 });
yield return new Example("2", new Options_With_Empty_Enum_First_Element { BaseEnum = EntityType.T1 });
yield return new Example("3", new Options_With_Empty_Enum_First_Element { Value = 1, Double = 0.1, Bool = false });
yield return new Example("4", new Options_With_Empty_Enum_First_Element { BaseEnum = EntityType.T0, Value = 1, Double = 0.1, Bool = true });
}
}
}
}