1 write to IdentifierToken
System.CommandLine (1)
Parsing\OptionResult.cs (1)
22IdentifierToken = token;
31 references to IdentifierToken
dotnet (1)
Extensions\ParseResultExtensions.cs (1)
171return optionResult.IdentifierToken ?? new Token($"--{optionResult.Option.Name}", TokenType.Option, optionResult.Option);
dotnet-watch (1)
CommandLine\CommandLineOptions.cs (1)
329=> optionResult.IdentifierToken?.Value ?? optionResult.Option.Name;
Microsoft.DotNet.Cli.Definitions (4)
Commands\New\CommandDefinitionExtensions.cs (3)
98if (optionResult.IdentifierToken is { } && !string.IsNullOrWhiteSpace(optionResult.IdentifierToken.Value)) 100wrongTokens.Add($"'{optionResult.IdentifierToken.Value}'");
Help\LocalizationResources.cs (1)
109private static string GetOptionName(OptionResult optionResult) => optionResult.IdentifierToken?.Value ?? optionResult.Option.Name;
Microsoft.TemplateEngine.Cli (19)
ChoiceTemplateParameter.cs (6)
117or.IdentifierToken?.Value, 123argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_MissingDefaultValue, or.IdentifierToken?.Value)); 136or.IdentifierToken?.Value, 142argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_MissingDefaultIfNoOptionValue, or.IdentifierToken?.Value)); 148argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_InvalidCount, or.IdentifierToken?.Value, argumentResult.Tokens.Count)); 159or.IdentifierToken?.Value,
CliTemplateParameter.cs (6)
338or.IdentifierToken?.Value, 346argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_MissingDefaultValue, or.IdentifierToken?.Value)); 360or.IdentifierToken?.Value, 365argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_MissingDefaultIfNoOptionValue, or.IdentifierToken?.Value)); 379or.IdentifierToken?.Value, 386argumentResult.AddError(string.Format(LocalizableStrings.ParseTemplateOption_Error_InvalidCount, or.IdentifierToken?.Value, argumentResult.Tokens.Count));
Commands\BaseFilterableArgs.cs (1)
42return _filters[filter].IdentifierToken?.Value;
Commands\create\InstantiateCommand.NoMatchHandling.cs (2)
192if (result.GetResult(option) is { } optionResult && optionResult.IdentifierToken is { } token) 206if (option.Condition && result.GetResult(option.Option) is { } optionResult && optionResult.IdentifierToken is { } token)
Commands\create\InstantiateCommandArgs.cs (1)
44if (optionResult.IdentifierToken is { } token)
Commands\create\InvalidTemplateOptionResult.cs (1)
102optionResult.IdentifierToken?.Value ?? string.Empty,
Commands\create\TemplateOptionResult.cs (1)
48optionResult.IdentifierToken?.Value ?? string.Empty,
Commands\NewCommandArgs.cs (1)
39if (o.IdentifierToken is { } token) { tokensToEvaluate.Add(token); }
System.CommandLine (6)
LocalizationResources.cs (1)
257private static string GetOptionName(OptionResult optionResult) => optionResult.IdentifierToken?.Value ?? optionResult.Option.Name;
Parsing\OptionResult.cs (3)
34public bool Implicit => IdentifierToken is null || IdentifierToken.Implicit; 48public override string ToString() => $"{nameof(OptionResult)}: {IdentifierToken?.Value ?? Option.Name} {string.Join(" ", Tokens.Select(t => t.Value))}";
Parsing\ParseDiagramAction.cs (1)
142builder.Append(optionResult.IdentifierToken?.Value ?? optionResult.Option.Name);
VersionOption.cs (1)
58result.AddError(LocalizationResources.VersionOptionCannotBeCombinedWithOtherArguments(result.IdentifierToken?.Value ?? result.Option.Name));