37 instantiations of ArgumentArity
Microsoft.DotNet.Cli.Definitions (24)
Commands\New\InstantiateCommandDefinition.cs (2)
17Arity = new ArgumentArity(0, 999) 41Arity = new ArgumentArity(0, 1)
Commands\New\NewCommandDefinition.cs (2)
92Arity = new ArgumentArity(0, 999), 180Arity = new ArgumentArity(0, 1),
Commands\New\NewDetailsCommandDefinition.cs (1)
22Arity = new ArgumentArity(1, 1)
Commands\New\NewInstallCommandDefinition.cs (1)
48Arity = new ArgumentArity(1, 99)
Commands\New\NewListCommandDefinition.cs (1)
73Arity = new ArgumentArity(0, 1)
Commands\New\NewSearchCommandDefinition.cs (1)
66Arity = new ArgumentArity(0, 1)
Commands\New\NewUninstallCommandDefinition.cs (1)
32Arity = new ArgumentArity(0, 99)
Commands\New\SharedOptionsFactory.cs (14)
17Arity = new ArgumentArity(0, 1), 28Arity = new ArgumentArity(1, 99), 41Arity = new ArgumentArity(0, 1), 52Arity = new ArgumentArity(1, 1), 63Arity = new ArgumentArity(1, 1), 75Arity = new ArgumentArity(1, 1), 86Arity = new ArgumentArity(1, 1), 97Arity = new ArgumentArity(1, 1), 108Arity = new ArgumentArity(1, 1), 117Arity = new ArgumentArity(1, 1) 137Arity = new ArgumentArity(1, 4), 165Arity = new ArgumentArity(1, 1) 173Arity = new ArgumentArity(0, 1) 181Arity = new ArgumentArity(0, 1)
Commands\Project\ProjectConvertCommandDefinition.cs (1)
20Arity = new ArgumentArity(1, 1)
Microsoft.TemplateEngine.Cli (8)
ChoiceTemplateParameter.cs (1)
78Arity = new ArgumentArity(DefaultIfOptionWithoutValue == null ? 1 : 0, AllowMultipleValues ? _choices.Count : 1),
CliTemplateParameter.cs (5)
213Arity = new ArgumentArity(0, 1) 218Arity = new ArgumentArity(string.IsNullOrWhiteSpace(DefaultIfOptionWithoutValue) ? 1 : 0, 1) 223Arity = new ArgumentArity(DefaultIfOptionWithoutValue == null ? 1 : 0, 1) 228Arity = new ArgumentArity(string.IsNullOrWhiteSpace(DefaultIfOptionWithoutValue) ? 1 : 0, 1) 233Arity = new ArgumentArity(string.IsNullOrWhiteSpace(DefaultIfOptionWithoutValue) ? 1 : 0, 1)
Commands\create\InstantiateCommand.NoMatchHandling.cs (1)
184Arity = new ArgumentArity(0, 999)
Commands\create\TemplateCommand.cs (1)
112Arity = new ArgumentArity(1, 1),
System.CommandLine (5)
ArgumentArity.cs (5)
118public static ArgumentArity Zero => new(0, 0); 123public static ArgumentArity ZeroOrOne => new(0, 1); 128public static ArgumentArity ExactlyOne => new(1, 1); 133public static ArgumentArity ZeroOrMore => new(0, MaximumArity); 138public static ArgumentArity OneOrMore => new(1, MaximumArity);
239 references to ArgumentArity
aspire (8)
Commands\AddCommand.cs (1)
35Arity = ArgumentArity.ZeroOrOne
Commands\DescribeCommand.cs (1)
79Arity = ArgumentArity.ZeroOrOne
Commands\DoCommand.cs (2)
31Arity = isExtensionHost ? ArgumentArity.ZeroOrOne : ArgumentArity.ExactlyOne
Commands\ExportCommand.cs (1)
44Arity = ArgumentArity.ZeroOrOne
Commands\LogsCommand.cs (1)
84Arity = ArgumentArity.ZeroOrOne
Commands\Sdk\SdkDumpCommand.cs (1)
40Arity = ArgumentArity.ZeroOrMore
Commands\TelemetryCommandHelpers.cs (1)
37Arity = ArgumentArity.ZeroOrOne
Aspire.RuntimeIdentifier.Tool (1)
Program.cs (1)
38Arity = ArgumentArity.OneOrMore,
cdac-build-tool (4)
ComposeCommand.cs (4)
13private readonly Argument<string[]> inputFiles = new("INPUT [INPUTS...]") { Arity = ArgumentArity.OneOrMore, Description = "One or more input files" }; 14private readonly Option<string> outputFile = new("-o") { Arity = ArgumentArity.ExactlyOne, HelpName = "OUTPUT", Required = true, Description = "Output file" }; 15private readonly Option<string> baselinePath = new("-b", "--baseline") { Arity = ArgumentArity.ExactlyOne, HelpName = "BASELINEPATH", Description = "Directory containing the baseline contracts"}; 16private readonly Option<string> templateFile = new("-i", "--input-template") { Arity = ArgumentArity.ExactlyOne, HelpName = "TEMPLATE", Description = "Contract descriptor template to be filled in" };
crossgen2 (2)
Crossgen2RootCommand.cs (2)
20new("input-file-path") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = "Input file(s)", Arity = ArgumentArity.OneOrMore }; 90new("--targetarch") { CustomParser = MakeTargetArchitecture, DefaultValueFactory = MakeTargetArchitecture, Description = SR.TargetArchOption, Arity = ArgumentArity.OneOrMore, HelpName = "arg" };
dotnet (2)
CliSchema.cs (2)
98private static ArityDetails CreateArityDetails(ArgumentArity arity) 102maximum: arity.MaximumNumberOfValues == ArgumentArity.ZeroOrMore.MaximumNumberOfValues ? null : arity.MaximumNumberOfValues
dotnet-format (3)
Commands\FormatCommandCommon.cs (3)
26Arity = ArgumentArity.ZeroOrOne 85Arity = ArgumentArity.ZeroOrOne, 91Arity = ArgumentArity.ZeroOrOne,
dotnet-sourcelink (2)
dotnet-watch (11)
CommandLine\CommandLineOptions.cs (1)
240if (optionResult.Option is Option<bool> boolOpt && boolOpt.Arity.Equals(ArgumentArity.Zero) && optionResult.Implicit)
CommandLine\DotnetWatchCommandDefinition.cs (10)
13public readonly Option<bool> QuietOption = new("--quiet", "-q") { Description = Resources.Help_Quiet, Arity = ArgumentArity.Zero }; 14public readonly Option<bool> VerboseOption = new("--verbose") { Description = Resources.Help_Verbose, Arity = ArgumentArity.Zero }; 15public readonly Option<bool> ListOption = new("--list") { Description = Resources.Help_List, Arity = ArgumentArity.Zero }; 16public readonly Option<bool> NoHotReloadOption = new("--no-hot-reload") { Description = Resources.Help_NoHotReload, Arity = ArgumentArity.Zero }; 17public readonly Option<bool> NonInteractiveOption = new("--non-interactive") { Description = Resources.Help_NonInteractive, Arity = ArgumentArity.Zero }; 42Arity = ArgumentArity.ZeroOrOne, 50Arity = ArgumentArity.ZeroOrOne, 58Arity = ArgumentArity.ZeroOrOne, 66Arity = ArgumentArity.ZeroOrOne, 73Arity = ArgumentArity.Zero
ilasm (1)
IlasmRootCommand.cs (1)
13new("input-file-paths") { Description = "Input IL source file(s)", Arity = ArgumentArity.OneOrMore };
ilc (1)
ILCompilerRootCommand.cs (1)
18new("input-file-path") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true), Description = "Input file(s)", Arity = ArgumentArity.OneOrMore };
Microsoft.DotNet.Cli.Definitions (154)
Commands\Build\BuildCommandDefinition.cs (3)
17Arity = ArgumentArity.ZeroOrMore 31Arity = ArgumentArity.Zero 37Arity = ArgumentArity.Zero
Commands\BuildServer\BuildServerShutdownCommandDefinition.cs (3)
13Arity = ArgumentArity.Zero 19Arity = ArgumentArity.Zero 25Arity = ArgumentArity.Zero
Commands\Clean\CleanCommandDefinition.cs (1)
18Arity = ArgumentArity.ZeroOrMore
Commands\Clean\CleanFileBasedAppArtifactsCommandDefinition.cs (1)
15Arity = ArgumentArity.Zero,
Commands\DotNetCommandDefinition.cs (6)
45Arity = ArgumentArity.ZeroOrOne, 53Arity = ArgumentArity.Zero 58Arity = ArgumentArity.Zero 64Arity = ArgumentArity.Zero, 71Arity = ArgumentArity.Zero 76Arity = ArgumentArity.Zero
Commands\Help\HelpCommandDefinition.cs (1)
16Arity = ArgumentArity.ZeroOrMore
Commands\Hidden\List\ListCommandDefinition.cs (1)
20Arity = ArgumentArity.ZeroOrOne
Commands\Hidden\List\ListReferenceCommandDefinition.cs (1)
12public readonly Argument<string> Argument = new("argument") { Arity = ArgumentArity.ZeroOrOne, Hidden = true };
Commands\New\NewListCommandDefinition.cs (1)
22Arity = ArgumentArity.Zero
Commands\New\NewSearchCommandDefinition.cs (1)
20Arity = ArgumentArity.Zero
Commands\New\NewUpdateCommandDefinition.cs (1)
41Arity = ArgumentArity.Zero
Commands\New\SharedOptionsFactory.cs (1)
126Arity = ArgumentArity.Zero,
Commands\NuGet\NuGetCommandDefinition.cs (19)
16Arity = ArgumentArity.Zero 54Arity = ArgumentArity.OneOrMore 59Arity = ArgumentArity.Zero 66Arity = ArgumentArity.Zero 73Arity = ArgumentArity.Zero 98Arity = ArgumentArity.Zero 103Arity = ArgumentArity.Zero 108Arity = ArgumentArity.Zero 129Arity = ArgumentArity.OneOrMore 134Arity = ArgumentArity.Zero 149Arity = ArgumentArity.Zero 154Arity = ArgumentArity.Zero 159Arity = ArgumentArity.Zero 166Arity = ArgumentArity.Zero 197Arity = ArgumentArity.OneOrMore 202Arity = ArgumentArity.Zero 226Arity = ArgumentArity.Zero 360Arity = ArgumentArity.OneOrMore 376Arity = ArgumentArity.Zero
Commands\Pack\PackCommandDefinition.cs (6)
19Arity = ArgumentArity.ZeroOrMore 33Arity = ArgumentArity.Zero 39Arity = ArgumentArity.Zero 45Arity = ArgumentArity.Zero 51Arity = ArgumentArity.Zero 79Arity = ArgumentArity.ExactlyOne,
Commands\Package\PackageAddCommandDefinition.cs (2)
30Arity = ArgumentArity.Zero 42Arity = ArgumentArity.Zero
Commands\Package\PackageListCommandDefinition.cs (8)
22Arity = ArgumentArity.Zero 28Arity = ArgumentArity.Zero 34Arity = ArgumentArity.Zero 47Arity = ArgumentArity.Zero 53Arity = ArgumentArity.Zero 59Arity = ArgumentArity.Zero 65Arity = ArgumentArity.Zero 86Arity = ArgumentArity.Zero
Commands\Package\PackageRemoveCommandDefinition.cs (1)
29Arity = ArgumentArity.OneOrMore,
Commands\Package\PackageSearchCommandDefinition.cs (3)
17Arity = ArgumentArity.ZeroOrOne 42Arity = ArgumentArity.Zero 50Arity = ArgumentArity.Zero
Commands\Project\ProjectConvertCommandDefinition.cs (4)
13Arity = ArgumentArity.ExactlyOne, 26Arity = ArgumentArity.Zero, 34Arity = ArgumentArity.Zero, 40Arity = ArgumentArity.Zero,
Commands\Publish\PublishCommandDefinition.cs (2)
17Arity = ArgumentArity.ZeroOrMore 38Arity = ArgumentArity.Zero
Commands\Reference\ReferenceAddCommandDefinition.cs (1)
25Arity = ArgumentArity.OneOrMore,
Commands\Reference\ReferenceRemoveCommandDefinition.cs (1)
23Arity = ArgumentArity.OneOrMore,
Commands\Restore\RestoreCommandDefinition.cs (5)
17Arity = ArgumentArity.ZeroOrMore 37Arity = ArgumentArity.Zero 43Arity = ArgumentArity.Zero 55Arity = ArgumentArity.Zero 127Arity = ArgumentArity.Zero,
Commands\Run\RunCommandDefinition.cs (4)
43Arity = ArgumentArity.Zero 60Arity = ArgumentArity.Zero 68Arity = ArgumentArity.Zero 80Arity = ArgumentArity.Zero,
Commands\Solution\SolutionAddCommandDefinition.cs (1)
14Arity = ArgumentArity.ZeroOrMore,
Commands\Solution\SolutionCommandDefinition.cs (1)
21Arity = ArgumentArity.ZeroOrOne
Commands\Solution\SolutionListCommandDefinition.cs (1)
13Arity = ArgumentArity.Zero
Commands\Solution\SolutionRemoveCommandDefinition.cs (1)
14Arity = ArgumentArity.ZeroOrMore
Commands\Test\TestCommandDefinition.MicrosoftTestingPlatform.cs (10)
18Arity = ArgumentArity.ExactlyOne 25Arity = ArgumentArity.ExactlyOne 46Arity = ArgumentArity.ExactlyOne 55Arity = ArgumentArity.ExactlyOne 64Arity = ArgumentArity.ExactlyOne 93Arity = ArgumentArity.Zero 99Arity = ArgumentArity.Zero 105Arity = ArgumentArity.ExactlyOne 113Arity = ArgumentArity.Zero 119Arity = ArgumentArity.Zero
Commands\Test\TestCommandDefinition.VSTest.cs (6)
23Arity = ArgumentArity.Zero 71Arity = ArgumentArity.Zero 90Arity = ArgumentArity.Zero 96Arity = ArgumentArity.Zero 104Arity = ArgumentArity.Zero 110Arity = ArgumentArity.Zero
Commands\Tool\StoreCommandDefinition.cs (4)
15Arity = ArgumentArity.ZeroOrMore, 22Arity = ArgumentArity.OneOrMore 60Arity = ArgumentArity.Zero 66Arity = ArgumentArity.Zero
Commands\Tool\ToolAppliedOption.cs (7)
13Arity = ArgumentArity.Zero, 19Arity = ArgumentArity.Zero, 26Arity = ArgumentArity.Zero 44Arity = ArgumentArity.ZeroOrOne, 51Arity = ArgumentArity.Zero 57Arity = ArgumentArity.Zero 81Arity = ArgumentArity.Zero
Commands\Tool\ToolInstallCommandDefinition.cs (1)
15Arity = ArgumentArity.ZeroOrOne,
Commands\Tool\ToolListCommandDefinition.cs (2)
14Arity = ArgumentArity.ZeroOrOne, 24Arity = ArgumentArity.ZeroOrOne,
Commands\Tool\ToolRunCommandDefinition.cs (1)
26Arity = ArgumentArity.Zero
Commands\Tool\ToolSearchCommandDefinition.cs (1)
19Arity = ArgumentArity.Zero
Commands\Tool\ToolUninstallCommandDefinition.cs (1)
14Arity = ArgumentArity.ExactlyOne
Commands\Workload\WorkloadCommandDefinition.cs (2)
29Arity = ArgumentArity.Zero 35Arity = ArgumentArity.Zero
Commands\Workload\WorkloadCommandDefinitionBase.cs (3)
27Arity = ArgumentArity.OneOrMore, 47Arity = ArgumentArity.Zero 60Arity = ArgumentArity.Zero
Commands\Workload\WorkloadConfigCommandDefinition.cs (1)
20Arity = ArgumentArity.ZeroOrOne
Commands\Workload\WorkloadRestoreCommandDefinition.cs (1)
13Arity = ArgumentArity.ZeroOrMore
Commands\Workload\WorkloadSearchCommandDefinition.cs (1)
12Arity = ArgumentArity.ZeroOrOne,
Commands\Workload\WorkloadSearchVersionsCommandDefinition.cs (1)
12Arity = ArgumentArity.ZeroOrMore,
Commands\Workload\WorkloadUpdateCommandDefinition.cs (2)
20Arity = ArgumentArity.Zero 26Arity = ArgumentArity.Zero
Common\CommonArguments.cs (2)
21Arity = ArgumentArity.ZeroOrOne, 30Arity = ArgumentArity.ExactlyOne,
Common\CommonOptions.cs (17)
18Arity = ArgumentArity.Zero, 28Arity = ArgumentArity.ZeroOrMore, 43Arity = ArgumentArity.ZeroOrMore, 76Arity = ArgumentArity.ZeroOrMore 89Arity = ArgumentArity.ZeroOrMore 121Arity = ArgumentArity.OneOrMore, 194Arity = ArgumentArity.Zero 227Arity = ArgumentArity.Zero 233Arity = ArgumentArity.Zero, 255Arity = acceptArgument ? ArgumentArity.ZeroOrOne : ArgumentArity.Zero, 269Arity = ArgumentArity.Zero 275Arity = ArgumentArity.Zero, 282Arity = ArgumentArity.ZeroOrOne 291Arity = ArgumentArity.Zero 359Arity = ArgumentArity.Zero 378Arity = ArgumentArity.Zero
Common\ImplicitRestoreOptions.cs (5)
41Arity = ArgumentArity.Zero 55Arity = ArgumentArity.Zero 62Arity = ArgumentArity.Zero 69Arity = ArgumentArity.Zero 76Arity = ArgumentArity.Zero
Common\NuGetRestoreOptions.cs (4)
14Arity = ArgumentArity.Zero, 22Arity = ArgumentArity.Zero, 28Arity = ArgumentArity.Zero, 35Arity = ArgumentArity.Zero,
Help\HelpBuilder.Default.cs (1)
58static string? GetUsageLabel(string? helpName, Type valueType, List<Func<CompletionContext, IEnumerable<CompletionItem>>> completionSources, Symbol symbol, ArgumentArity arity)
NuGet.CommandLine.XPlat (30)
Commands\ConfigCommands\ConfigCommand.cs (8)
20Arity = ArgumentArity.Zero 25Arity = ArgumentArity.ExactlyOne, 31Arity = ArgumentArity.ExactlyOne, 37Arity = ArgumentArity.ExactlyOne, 43Arity = ArgumentArity.ExactlyOne, 49Arity = ArgumentArity.ZeroOrOne, 55Arity = ArgumentArity.Zero, 61Arity = ArgumentArity.ZeroOrOne,
Commands\Package\Download\PackageDownloadCommand.cs (6)
32Arity = ArgumentArity.OneOrMore, 40Arity = ArgumentArity.Zero 46Arity = ArgumentArity.ExactlyOne 52Arity = ArgumentArity.ExactlyOne 58Arity = ArgumentArity.Zero 64Arity = ArgumentArity.OneOrMore
Commands\Package\Update\PackageUpdateCommand.cs (1)
30Arity = ArgumentArity.ZeroOrMore,
Commands\PackageSearch\PackageSearchCommand.cs (11)
33Arity = ArgumentArity.ZeroOrOne, 39Arity = ArgumentArity.OneOrMore 45Arity = ArgumentArity.Zero 51Arity = ArgumentArity.Zero 57Arity = ArgumentArity.Zero 63Arity = ArgumentArity.ExactlyOne 69Arity = ArgumentArity.ExactlyOne 75Arity = ArgumentArity.ExactlyOne 81Arity = ArgumentArity.ExactlyOne 87Arity = ArgumentArity.ExactlyOne 92Arity = ArgumentArity.Zero
Commands\Why\WhyCommand.cs (4)
72Arity = ArgumentArity.ZeroOrMore, 103Arity = ArgumentArity.ExactlyOne 109Arity = ArgumentArity.OneOrMore 114Arity = ArgumentArity.Zero
System.CommandLine (18)
Argument.cs (3)
17private ArgumentArity _arity; 33public ArgumentArity Arity 39_arity = ArgumentArity.Default(this, FirstParent);
ArgumentArity.cs (9)
18public readonly struct ArgumentArity : IEquatable<ArgumentArity> 64public bool Equals(ArgumentArity other) => 70public override bool Equals(object? obj) => obj is ArgumentArity arity && Equals(arity); 118public static ArgumentArity Zero => new(0, 0); 123public static ArgumentArity ZeroOrOne => new(0, 1); 128public static ArgumentArity ExactlyOne => new(1, 1); 133public static ArgumentArity ZeroOrMore => new(0, MaximumArity); 138public static ArgumentArity OneOrMore => new(1, MaximumArity); 140internal static ArgumentArity Default(Argument argument, SymbolNode? firstParent)
Help\HelpBuilder.Default.cs (1)
83ArgumentArity arity)
Help\HelpOption.cs (1)
37Arity = ArgumentArity.Zero;
Option.cs (1)
69public ArgumentArity Arity
Parsing\ArgumentResult.cs (1)
153if (!ArgumentArity.Validate(this, out ArgumentConversionResult? arityFailure))
Parsing\CommandResult.cs (1)
119if (!ArgumentArity.Validate(argumentResult, out var error))
VersionOption.cs (1)
39Arity = ArgumentArity.Zero;
System.CommandLine.StaticCompletions (2)
CompletionsCommandDefinition.cs (1)
13Arity = ArgumentArity.ZeroOrOne,
HelpGenerationExtensions.cs (1)
114public static bool IsFlag(this Option option) => option.Arity.Equals(ArgumentArity.Zero);