19 references to GetValueOrDefault
aspire (2)
Commands\ParseResultHelper.cs (1)
291optionResult.GetValueOrDefault<FileSystemInfo?>() is { } fileSystemInfo
Commands\ResourceCommand.cs (1)
426var value = result.GetValueOrDefault<string?>();
crossgen2 (1)
parent\parent\Common\CommandLineHelpers.cs (1)
245object val = optionResult.GetValueOrDefault<object>();
dotnet-aot (1)
parent\dotnet\Telemetry\TopLevelCommandNameAndOptionToLog.cs (1)
26&& optionResult.GetValueOrDefault<object>() is object optionValue
ilc (1)
parent\parent\Common\CommandLineHelpers.cs (1)
245object 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)
47if (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>(),