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