92 writes to DefaultValueFactory
aspire (6)
Commands\RootCommand.cs (2)
60
DefaultValueFactory
= _ => false
68
DefaultValueFactory
= _ => false
Commands\WaitCommand.cs (2)
33
DefaultValueFactory
= _ => "healthy"
39
DefaultValueFactory
= _ => 120
Templating\DotNetTemplateFactory.cs (2)
43
DefaultValueFactory
= _ => false
48
DefaultValueFactory
= _ => false
aspire-managed (8)
NuGet\Commands\LayoutCommand.cs (1)
40
DefaultValueFactory
= _ => "net10.0"
NuGet\Commands\RestoreCommand.cs (3)
41
DefaultValueFactory
= _ => "net10.0"
48
DefaultValueFactory
= _ => "./obj"
61
DefaultValueFactory
= _ => Array.Empty<string>(),
NuGet\Commands\SearchCommand.cs (4)
43
DefaultValueFactory
= _ => 100
50
DefaultValueFactory
= _ => 0
57
DefaultValueFactory
= _ => Array.Empty<string>(),
77
DefaultValueFactory
= _ => "json"
crossgen2 (17)
Crossgen2RootCommand.cs (17)
22
new("--unrooted-input-file-paths", "-u") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, true),
DefaultValueFactory
= result => Helpers.BuildPathDictionary(result.Tokens, true), Description = SR.UnrootedInputFilesToCompile };
24
new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false),
DefaultValueFactory
= result => Helpers.BuildPathDictionary(result.Tokens, false), Description = SR.ReferenceFiles };
30
new("--mibc", "-m") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = SR.MibcFiles };
34
new("--obj-format", "-f") { CustomParser = MakeOutputFormat,
DefaultValueFactory
= MakeOutputFormat, Description = SR.OutputFormat, HelpName = "arg" };
48
new("--type-validation") {
DefaultValueFactory
= _ => TypeValidationRule.Automatic, Description = SR.TypeValidation, HelpName = "arg" };
52
new("--inputbubbleref") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false),
DefaultValueFactory
= result => Helpers.BuildPathDictionary(result.Tokens, false), Description = SR.InputBubbleReferenceFiles };
78
new("--systemmodule") {
DefaultValueFactory
= _ => Helpers.DefaultSystemModule, Description = SR.SystemModuleOverrideOption };
82
new("--codegenopt") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = SR.CodeGenOptions };
90
new("--targetarch") { CustomParser = MakeTargetArchitecture,
DefaultValueFactory
= MakeTargetArchitecture, Description = SR.TargetArchOption, Arity = ArgumentArity.OneOrMore, HelpName = "arg" };
94
new("--maxgenericcycle") {
DefaultValueFactory
= _ => ReadyToRunCompilerContext.DefaultGenericCycleDepthCutoff, Description = SR.GenericCycleDepthCutoff };
96
new("--maxgenericcyclebreadth") {
DefaultValueFactory
= _ => ReadyToRunCompilerContext.DefaultGenericCycleBreadthCutoff, Description = SR.GenericCycleBreadthCutoff };
98
new("--targetos") { CustomParser = result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null),
DefaultValueFactory
= result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), Description = SR.TargetOSOption, HelpName = "arg" };
112
new("--parallelism") { CustomParser = MakeParallelism,
DefaultValueFactory
= MakeParallelism, Description = SR.ParalellismOption };
128
new("--perfmap-format-version") {
DefaultValueFactory
= _ => 0, Description = SR.PerfMapFormatVersionOption };
134
new("--non-local-generics-module") {
DefaultValueFactory
= _ => string.Empty, Description = SR.NonLocalGenericsModule };
136
new("--method-layout") { CustomParser = MakeMethodLayoutAlgorithm,
DefaultValueFactory
= MakeMethodLayoutAlgorithm, Description = SR.MethodLayoutOption, HelpName = "arg" };
138
new("--file-layout") { CustomParser = MakeFileLayoutAlgorithm,
DefaultValueFactory
= MakeFileLayoutAlgorithm, Description = SR.FileLayoutOption, HelpName = "arg" };
dotnet-format (4)
Commands\FormatCommandCommon.cs (4)
49
DefaultValueFactory
= _ => Array.Empty<string>(),
55
DefaultValueFactory
= _ => Array.Empty<string>(),
65
DefaultValueFactory
= _ => Array.Empty<string>(),
71
DefaultValueFactory
= _ => Array.Empty<string>(),
dotnet-suggest (1)
SuggestionDispatcher.cs (1)
97
DefaultValueFactory
= (_) => short.MaxValue
ilc (28)
ILCompilerRootCommand.cs (28)
20
new("--reference", "-r") { CustomParser = result => Helpers.BuildPathDictionary(result.Tokens, false),
DefaultValueFactory
= result => Helpers.BuildPathDictionary(result.Tokens, false), Description = "Reference file(s) for compilation" };
30
new("--mibc", "-m") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Mibc file(s) for profile guided optimization" };
32
new("--method-layout") { CustomParser = MakeMethodLayoutAlgorithm,
DefaultValueFactory
= MakeMethodLayoutAlgorithm, Description = "Layout algorithm used by profile-driven optimization for arranging methods in a file.", HelpName = "arg" };
34
new("--file-layout") { CustomParser = MakeFileLayoutAlgorithm,
DefaultValueFactory
= MakeFileLayoutAlgorithm, Description = "Layout algorithm used by profile-driven optimization for arranging non-method contents in a file.", HelpName = "arg" };
38
new("--satellite") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Satellite assemblies associated with inputs/references" };
64
new("--systemmodule") {
DefaultValueFactory
= _ => Helpers.DefaultSystemModule, Description = "System module name (default: System.Private.CoreLib)" };
74
new("--codegenopt") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Define a codegen option" };
76
new("--rdxml") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "RD.XML file(s) for compilation" };
78
new("--descriptor") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "ILLink.Descriptor file(s) for compilation" };
80
new("--substitution") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "ILLink.Substitution file(s) for compilation" };
108
new("--initassembly") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Assembly(ies) with a library initializer" };
110
new("--feature") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Feature switches to apply (format: 'Namespace.Name=[true|false]'" };
112
new("--runtimeopt") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Runtime options to set" };
114
new("--runtimeknob") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Runtime knobs to set" };
116
new("--parallelism") { CustomParser = MakeParallelism,
DefaultValueFactory
= MakeParallelism, Description = "Maximum number of threads to use during compilation" };
134
new("--nowarn") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Disable specific warning messages" };
142
new("--singlewarnassembly") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Generate single AOT/trimming warning for given assembly" };
144
new("--nosinglewarnassembly") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Expand AOT/trimming warnings for given assembly" };
152
new("--directpinvoke") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "PInvoke to call directly" };
154
new("--directpinvokelist") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "File with list of PInvokes to call directly" };
156
new("--root") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Fully generate given assembly" };
158
new("--conditionalroot") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Fully generate given assembly if it's used" };
160
new("--trim") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Trim the specified assembly" };
164
new("--targetarch") { CustomParser = MakeTargetArchitecture,
DefaultValueFactory
= MakeTargetArchitecture, Description = "Target architecture for cross compilation", HelpName = "arg" };
166
new("--targetos") { CustomParser = result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null),
DefaultValueFactory
= result => Helpers.GetTargetOS(result.Tokens.Count > 0 ? result.Tokens[0].Value : null), Description = "Target OS for cross compilation", HelpName = "arg" };
174
new("--maxgenericcycle") {
DefaultValueFactory
= _ => CompilerTypeSystemContext.DefaultGenericCycleDepthCutoff, Description = "Max depth of generic cycle" };
176
new("--maxgenericcyclebreadth") {
DefaultValueFactory
= _ => CompilerTypeSystemContext.DefaultGenericCycleBreadthCutoff, Description = "Max breadth of generic cycle expansion" };
182
new("--generateunmanagedentrypoints") {
DefaultValueFactory
= _ => Array.Empty<string>(), Description = "Generate unmanaged entrypoints for a given assembly" };
Microsoft.DotNet.Cli.Definitions (14)
Commands\Clean\CleanFileBasedAppArtifactsCommandDefinition.cs (1)
21
DefaultValueFactory
= _ => 30,
Commands\New\NewCommandDefinition.cs (3)
20
DefaultValueFactory
= static _ => false,
28
DefaultValueFactory
= static _ => false,
35
DefaultValueFactory
= _ => DefaultVerbosity,
Commands\NuGet\NuGetCommandDefinition.cs (1)
321
DefaultValueFactory
= _ => "SHA256"
Commands\Solution\SolutionAddCommandDefinition.cs (1)
34
DefaultValueFactory
= (_) => true,
Commands\Tool\ToolInstallCommandDefinition.cs (1)
16
DefaultValueFactory
= _ => true,
Commands\Tool\ToolListCommandDefinition.cs (1)
25
DefaultValueFactory
= _ => ToolListOutputFormat.table,
Commands\Workload\WorkloadSearchVersionsCommandDefinition.cs (1)
18
DefaultValueFactory
= (_) => 5
Common\CommonOptions.cs (5)
73
DefaultValueFactory
= _ => defaultTargetName is not null ? [defaultTargetName] : null,
86
DefaultValueFactory
= _ => [defaultTargetName],
146
DefaultValueFactory
= _ => defaultVerbosity
257
DefaultValueFactory
= (ar) => !IsCIEnvironmentOrRedirected(),
357
DefaultValueFactory
= (ar) => EnvironmentVariableParser.ParseBool(Environment.GetEnvironmentVariable("DOTNET_NOLOGO"), defaultValue),
Microsoft.DotNet.VersionTools.Cli (2)
Program.cs (2)
31
DefaultValueFactory
= _ => "*.nupkg"
37
DefaultValueFactory
= _ => true
Microsoft.NET.Sdk.BlazorWebAssembly.Tool (1)
Program.cs (1)
20
DefaultValueFactory
= _ => CompressionLevel.SmallestSize,
Microsoft.NET.Sdk.StaticWebAssets.Tool (1)
Program.cs (1)
20
DefaultValueFactory
= (_) => CompressionLevel.SmallestSize,
Microsoft.TemplateEngine.Cli (8)
CliTemplateParameter.cs (6)
155
stringOption.
DefaultValueFactory
= (_) => DefaultValue;
158
booleanOption.
DefaultValueFactory
= (_) => bool.Parse(DefaultValue);
163
integerOption.
DefaultValueFactory
= (_) => Convert.ToInt64(DefaultValue, 16);
167
integerOption.
DefaultValueFactory
= (_) => long.Parse(DefaultValue);
171
floatOption.
DefaultValueFactory
= (_) => float.Parse(DefaultValue);
174
doubleOption.
DefaultValueFactory
= (_) => double.Parse(DefaultValue);
Commands\create\TemplateCommand.cs (2)
75
LanguageOption.
DefaultValueFactory
= (_) => defaultLanguage;
113
DefaultValueFactory
= (_) => AllowRunScripts.Prompt
NuGet.CommandLine.XPlat (2)
NuGetCommands.cs (1)
52
DefaultValueFactory
= _ => Console.IsOutputRedirected
Program.cs (1)
112
interactiveOption.
DefaultValueFactory
= _ => Console.IsOutputRedirected;