21 references to GetValueOrDefault
aspire (1)
Commands\RootCommand.cs (1)
156var waitForDebugger = result.GetValueOrDefault<bool>();
crossgen2 (1)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
223object val = optionResult.GetValueOrDefault<object>();
dotnet (4)
Commands\New\NewCommandParser.cs (1)
62VerbosityOptions userSetVerbosity = verbosityOptionResult.GetValueOrDefault<VerbosityOptions>();
Commands\Pack\PackCommand.cs (1)
117var globalProperties = parseResult.GetResult("--property") is OptionResult propResult ? propResult.GetValueOrDefault<ReadOnlyDictionary<string, string>?>() : null;
Commands\Tool\Install\ToolInstallGlobalOrToolPathCommand.cs (1)
134result.GetValueOrDefault<T>() is { } t)
Telemetry\TopLevelCommandNameAndOptionToLog.cs (1)
26&& optionResult.GetValueOrDefault<object>() is object optionValue
ilc (1)
src\runtime\src\coreclr\tools\Common\CommandLineHelpers.cs (1)
223object val = optionResult.GetValueOrDefault<object>();
Microsoft.DotNet.Cli.CommandLine (2)
ForwardedOptionExtensions.cs (2)
43if (r.GetValueOrDefault<TValue>() is TValue value) 66if (r.GetValueOrDefault<TValue>() is TValue value)
Microsoft.DotNet.Cli.Definitions (1)
Commands\Workload\WorkloadSearchVersionsCommandDefinition.cs (1)
38if (optionResult.GetValueOrDefault<int>() <= 0)
Microsoft.TemplateEngine.Cli (7)
Commands\BaseFilterableArgs.cs (1)
32return _filters[filter].GetValueOrDefault<string>() ?? string.Empty;
Commands\create\InstantiateCommand.NoMatchHandling.cs (2)
162example = example.WithOption(_ => language.Option, language.GetValueOrDefault<string>()); 194baseInputParameters += $", {token.Value}='{optionResult.GetValueOrDefault<string>()}'";
Commands\create\TemplateCommand.cs (1)
78var value = optionResult.GetValueOrDefault<string>();
Commands\create\TemplateCommandArgs.cs (1)
108var optionValue = optionResult.GetValueOrDefault<object>();
Commands\create\TemplateOptionResult.cs (1)
49optionResult.Errors.Any() ? null : optionResult.GetValueOrDefault<object>()?.ToString());
Commands\Extensions.cs (1)
22return result.GetValueOrDefault<object>()?.ToString();
System.CommandLine (4)
Parsing\SymbolResult.cs (4)
120result.GetValueOrDefault<T>() is { } t) 140OptionResult optionResult => optionResult.GetValueOrDefault<T>(), 154optionResult.GetValueOrDefault<T>() is { } optionValue) 177OptionResult optionResult => optionResult.GetValueOrDefault<T>(),