-
Notifications
You must be signed in to change notification settings - Fork 481
/
Copy pathImmutable_Simple_Options.cs
62 lines (49 loc) · 2.36 KB
/
Immutable_Simple_Options.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
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright 2005-2015 Giacomo Stelluti Scala & Contributors. All rights reserved. See License.md in the project root for license information.
using System.Collections.Generic;
namespace CommandLine.Tests.Fakes
{
public class Immutable_Simple_Options
{
private readonly string stringValue;
private readonly IEnumerable<int> intSequence;
private readonly bool boolValue;
private readonly long longValue;
public Immutable_Simple_Options(string stringValue, IEnumerable<int> intSequence, bool boolValue, long longValue)
{
this.stringValue = stringValue;
this.intSequence = intSequence;
this.boolValue = boolValue;
this.longValue = longValue;
}
[Option(HelpText = "Define a string value here.")]
public string StringValue { get { return stringValue; } }
[Option('i', Min = 3, Max = 4, HelpText = "Define a int sequence here.")]
public IEnumerable<int> IntSequence { get { return intSequence; } }
[Option('x', HelpText = "Define a boolean or switch value here.")]
public bool BoolValue { get { return boolValue; } }
[Value(0)]
public long LongValue { get { return longValue; } }
}
public class Immutable_Simple_Options_Invalid_Ctor_Args
{
private readonly string stringValue;
private readonly IEnumerable<int> intSequence;
private readonly bool boolValue;
private readonly long longValue;
public Immutable_Simple_Options_Invalid_Ctor_Args(string stringValue1, IEnumerable<int> intSequence2, bool boolValue, long longValue)
{
this.stringValue = stringValue;
this.intSequence = intSequence;
this.boolValue = boolValue;
this.longValue = longValue;
}
[Option(HelpText = "Define a string value here.")]
public string StringValue { get { return stringValue; } }
[Option('i', Min = 3, Max = 4, HelpText = "Define a int sequence here.")]
public IEnumerable<int> IntSequence { get { return intSequence; } }
[Option('x', HelpText = "Define a boolean or switch value here.")]
public bool BoolValue { get { return boolValue; } }
[Value(0)]
public long LongValue { get { return longValue; } }
}
}