1 instantiation of CommandOption
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (1)
100
var option = new
CommandOption
(template, optionType)
64 references to CommandOption
Microsoft.AspNetCore.Shared.Tests (64)
CommandLineApplicationTests.cs (47)
172
CommandOption
first = null;
173
CommandOption
second = null;
193
CommandOption
first = null;
211
CommandOption
first = null;
212
CommandOption
second = null;
232
CommandOption
first = null;
233
CommandOption
second = null;
288
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
301
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
314
var
option = app.Option("--first <value>", "first option", CommandOptionType.SingleValue);
327
var
option = app.Option("--first <value>", "first option", CommandOptionType.SingleValue);
340
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
354
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
369
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
397
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
412
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
473
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
488
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
516
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
531
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
560
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
575
var
option = app.Option("--first", "first option", CommandOptionType.NoValue);
606
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
623
var
option = app.Option("--first", "first option", CommandOptionType.SingleValue);
794
var
optionA = app.Option("-a|--option-a", "", CommandOptionType.SingleValue, inherited: true);
797
var
optionB = app.Option("-b", "", CommandOptionType.SingleValue, inherited: false);
836
var
top = app.Option("-a|--always", "Top-level", CommandOptionType.SingleValue, inherited: false);
837
CommandOption
nested = null;
861
var
g = app.Option("-g|--global", "Global option", CommandOptionType.SingleValue, inherited: true);
864
var
n1 = s1.Option("--nest1", "Nested one level down", CommandOptionType.SingleValue, inherited: true);
867
var
n2 = s2.Option("--nest2", "Nested one level down", CommandOptionType.SingleValue, inherited: true);
916
var
optHelp = app.HelpOption("--help");
917
var
optVersion = app.VersionOption("--version", "1", "1.0");
918
var
optTop = app.Option("-t|--top <TOP>", "arg for command", CommandOptionType.SingleValue);
943
var
optHelp = app.HelpOption("--help");
944
var
optVersion = app.VersionOption("--version", "1", "1.0");
945
var
optTop = app.Option("-t|--top <TOP>", "arg for command", CommandOptionType.SingleValue);
970
var
optHelp = app.HelpOption("--help");
971
var
optVersion = app.VersionOption("--version", "1", "1.0");
972
var
optTop = app.Option("-t|--top <TOP>", "arg for command", CommandOptionType.SingleValue);
997
var
optHelp = app.HelpOption("--help");
998
var
optVersion = app.VersionOption("--version", "1", "1.0");
999
var
optTop = app.Option("-t|--top <TOP>", "arg for command", CommandOptionType.SingleValue);
1093
var
optFlag = app.Option("-f |--flag", "some flag", CommandOptionType.NoValue);
1128
var
optVerbose = app.Option("-v |--verbose", "be verbose", CommandOptionType.NoValue);
1176
CommandOption
firstOption = null;
1177
CommandOption
secondOption = null;
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (17)
39
Options = new List<
CommandOption
>();
53
public readonly List<
CommandOption
> Options;
54
public
CommandOption
OptionHelp { get; private set; }
55
public
CommandOption
OptionVersion { get; private set; }
67
public IEnumerable<
CommandOption
> GetOptions()
89
public
CommandOption
Option(string template, string description, CommandOptionType optionType)
92
public
CommandOption
Option(string template, string description, CommandOptionType optionType, bool inherited)
95
public
CommandOption
Option(string template, string description, CommandOptionType optionType, Action<
CommandOption
> configuration)
98
public
CommandOption
Option(string template, string description, CommandOptionType optionType, Action<
CommandOption
> configuration, bool inherited)
100
var
option = new CommandOption(template, optionType)
145
CommandOption
option = null;
382
public
CommandOption
HelpOption(string template)
391
public
CommandOption
VersionOption(string template,
406
public
CommandOption
VersionOption(string template,
498
foreach (
var
opt in options)