15 references to GetOptions
Microsoft.AspNetCore.Shared.Tests (15)
CommandLineApplicationTests.cs (11)
808
Assert.Equal(2, app.
GetOptions
().Count());
809
Assert.Single(subcmd.
GetOptions
());
879
Assert.DoesNotContain(app.
GetOptions
(), o => o.LongName == "nest2");
880
Assert.DoesNotContain(app.
GetOptions
(), o => o.LongName == "nest1");
881
Assert.Contains(app.
GetOptions
(), o => o.LongName == "global");
883
Assert.DoesNotContain(subcmd1.
GetOptions
(), o => o.LongName == "nest2");
884
Assert.Contains(subcmd1.
GetOptions
(), o => o.LongName == "nest1");
885
Assert.Contains(subcmd1.
GetOptions
(), o => o.LongName == "global");
887
Assert.Contains(subcmd2.
GetOptions
(), o => o.LongName == "nest2");
888
Assert.Contains(subcmd2.
GetOptions
(), o => o.LongName == "nest1");
889
Assert.Contains(subcmd2.
GetOptions
(), o => o.LongName == "global");
src\Shared\CommandLineUtils\CommandLine\CommandLineApplication.cs (4)
171
option = command.
GetOptions
().SingleOrDefault(opt => string.Equals(opt.LongName, longOptionName, StringComparison.Ordinal));
250
option = command.
GetOptions
().SingleOrDefault(opt => string.Equals(opt.ShortName, shortOption[0], StringComparison.Ordinal));
274
option = command.
GetOptions
().SingleOrDefault(opt => string.Equals(opt.SymbolName, shortOption[0], StringComparison.Ordinal));
489
var options = target.
GetOptions
().Where(o => o.ShowInHelpText).ToList();