2 implementations of IEnvironment
aspire (1)
HostEnvironment.cs (1)
13public sealed class HostEnvironment : IEnvironment
Aspire.Cli.Tests (1)
Utils\TestEnvironment.cs (1)
12internal sealed class TestEnvironment : IEnvironment
250 references to IEnvironment
aspire (175)
Acquisition\IdentityResolver.cs (3)
29/// depend on <see cref="IEnvironment"/> independently, avoiding a circular 63private readonly IEnvironment _environment; 73IEnvironment environment)
Acquisition\InstallationDiscovery.cs (2)
30private readonly IEnvironment _environment; 39IEnvironment environment,
Acquisition\InstallSourceDetector.cs (1)
17IEnvironment environment,
Agents\AgentClient.cs (5)
80public Func<CliExecutionContext, IEnvironment, string> GlobalSkillsDirectory { get; init; } 84public required Func<CliExecutionContext, IEnvironment, string> GlobalMcpConfigPath { get; init; } 98public string GetSkillBaseDirectory(AgentConfigurationScope scope, DirectoryInfo workspaceRoot, CliExecutionContext executionContext, IEnvironment environment) 105public string GetMcpConfigPath(AgentConfigurationScope scope, DirectoryInfo workspaceRoot, CliExecutionContext executionContext, IEnvironment environment) 112public IEnumerable<(string Path, string ServersPropertyName, bool ConfigureServer)> GetMcpConfigPaths(AgentConfigurationScope scope, DirectoryInfo workspaceRoot, CliExecutionContext executionContext, IEnvironment environment)
Agents\ClaudeCode\ClaudeCodePaths.cs (3)
10public static string GetConfigDirectory(CliExecutionContext executionContext, IEnvironment environment) 14public static string GetGlobalMcpConfigPath(CliExecutionContext executionContext, IEnvironment environment) 23private static string? GetConfigDirectoryOverride(CliExecutionContext executionContext, IEnvironment environment)
Agents\Copilot\CopilotAgentEnvironmentScanner.cs (1)
14IEnvironment environment,
Agents\Copilot\CopilotAppInstallationDetector.cs (1)
24IEnvironment environment,
Agents\Copilot\CopilotPaths.cs (1)
20public static string GetConfigDirectory(DirectoryInfo homeDirectory, IEnvironment environment)
Agents\Hooks\AgentTelemetryHook.cs (2)
16internal sealed class AgentTelemetryHook(IEnvironment environment) 102internal static string[]? Classify(string payload, IEnvironment environment, int maxPayloadCharacters)
Agents\Hooks\TelemetryHookConfigurator.cs (2)
36private readonly IEnvironment _environment; 42IEnvironment environment,
Agents\McpConfigFileHelper.cs (1)
20IEnvironment environment,
Agents\OpenCode\OpenCodePaths.cs (1)
17public static string GetGlobalMcpConfigPath(CliExecutionContext executionContext, IEnvironment environment)
Agents\VsCode\VsCodeAgentEnvironmentScanner.cs (1)
14IEnvironment environment,
Backchannel\AppHostCliBackchannel.cs (1)
35IEnvironment environment,
Bundles\BundleService.cs (2)
24IEnvironment environment, 886internal static async Task ExtractPayloadAsync(Stream payloadStream, string destinationPath, IEnvironment environment, CancellationToken cancellationToken)
Caching\AppHostInfoDiskCache.cs (5)
31/// Tracked inputs (see <see cref="ComputeKeyAsync(FileInfo, IEnvironment, in DotNetAppHostProject.AppHostImportDependencies)"/>): 111private readonly IEnvironment _environment; 113public AppHostInfoDiskCache(ILogger<AppHostInfoDiskCache> logger, CliExecutionContext executionContext, IConfigurationService configurationService, IEnvironment environment) 289internal static string ComputeKeyAsync(FileInfo projectFile, IEnvironment environment) 292internal static string ComputeKeyAsync(FileInfo projectFile, IEnvironment environment, in DotNetAppHostProject.AppHostImportDependencies importDependencies)
Certificates\CertificateGeneration\CertificateManager.cs (1)
56public static CertificateManager Create(ILogger logger, IEnvironment environment, CertificateConfiguration.NssDbOverride? nssDbOverride) => environment.IsWindows() ?
Certificates\CertificateGeneration\UnixCertificateManager.cs (3)
45private readonly IEnvironment _environment; 49public UnixCertificateManager(ILogger logger, IEnvironment environment, CertificateConfiguration.NssDbOverride? nssDbOverride) : base(logger) 57IEnvironment environment,
Certificates\CertificateHelpers.cs (1)
47internal static string GetDevCertsTrustPath(IEnvironment environment)
Certificates\CertificateService.cs (1)
55IEnvironment environment,
Certificates\NativeCertificateToolRunner.cs (1)
19IEnvironment environment,
Commands\AgentInitCommand.cs (2)
34private readonly IEnvironment _environment; 43IEnvironment environment,
Commands\AgentTelemetryCommand.cs (2)
37private readonly IEnvironment _environment; 93AgentTelemetryHook hook, IEnvironment environment, ConsoleEnvironment console)
Commands\CompletionsCommand.cs (3)
14public CompletionsCommand(IEnvironment environment, CommonCommandServices services) 28private readonly IEnvironment _environment; 30public ScriptCommand(IEnvironment environment, CommonCommandServices services)
Commands\DashboardRunCommand.cs (8)
36private readonly IEnvironment _environment; 82IEnvironment environment, 183private static void AddOptionArgs(ParseResult parseResult, List<string> args, IReadOnlyList<string> unmatchedTokens, IEnvironment environment) 204IEnvironment environment, Option<string?> option, string envVarName, string? defaultValue) 222IEnvironment environment, Option<bool> option, string envVarName, bool? defaultValue = null) 246internal static bool ConfigSettingHasValue(IReadOnlyList<string> unmatchedTokens, IEnvironment environment, string envVarName) 277internal static DashboardInfo ResolveDashboardInfo(List<string> dashboardArgs, IReadOnlyList<string> unmatchedTokens, IEnvironment environment, string? browserToken) 298internal static string? ResolveSettingValue(List<string> args, IReadOnlyList<string> unmatchedTokens, IEnvironment environment, string key)
Commands\DeployCommand.cs (1)
23public DeployCommand(IDotNetCliRunner runner, IProjectLocator projectLocator, IFeatures features, ICliHostEnvironment hostEnvironment, IAppHostProjectFactory projectFactory, IConfiguration configuration, IEnvironment environment, AspireSecretsStoreResolver aspireSecretsStoreResolver, ILogger<DeployCommand> logger, IAnsiConsole ansiConsole,
Commands\DestroyCommand.cs (1)
23public DestroyCommand(IDotNetCliRunner runner, IProjectLocator projectLocator, IFeatures features, ICliHostEnvironment hostEnvironment, IAppHostProjectFactory projectFactory, IConfiguration configuration, IEnvironment environment, AspireSecretsStoreResolver aspireSecretsStoreResolver, ILogger<DestroyCommand> logger, IAnsiConsole ansiConsole,
Commands\DoCommand.cs (1)
23public DoCommand(IDotNetCliRunner runner, IProjectLocator projectLocator, IFeatures features, ICliHostEnvironment hostEnvironment, IAppHostProjectFactory projectFactory, IConfiguration configuration, IEnvironment environment, AspireSecretsStoreResolver aspireSecretsStoreResolver, ILogger<DoCommand> logger, IAnsiConsole ansiConsole,
Commands\PipelineCommandBase.cs (2)
52private readonly IEnvironment _environment; 97protected PipelineCommandBase(string name, string description, IDotNetCliRunner runner, IProjectLocator projectLocator, IFeatures features, ICliHostEnvironment hostEnvironment, IAppHostProjectFactory projectFactory, IConfiguration configuration, IEnvironment environment, AspireSecretsStoreResolver aspireSecretsStoreResolver, ILogger logger, IAnsiConsole ansiConsole, CommonCommandServices services)
Commands\PsCommand.cs (2)
77private readonly IEnvironment _environment; 100IEnvironment environment,
Commands\PublishCommand.cs (1)
42public PublishCommand(IDotNetCliRunner runner, IProjectLocator projectLocator, IPublishCommandPrompter prompter, IFeatures features, ICliHostEnvironment hostEnvironment, IAppHostProjectFactory projectFactory, IConfiguration configuration, IEnvironment environment, AspireSecretsStoreResolver aspireSecretsStoreResolver, ILogger<PublishCommand> logger, IAnsiConsole ansiConsole,
Commands\RenderCommand.cs (2)
568_serviceProvider.GetRequiredService<IEnvironment>(), 818IEnvironment environment,
Commands\StopCommand.cs (2)
28private readonly IEnvironment _environment; 69IEnvironment environment,
Commands\TrayCommand.cs (1)
15public TrayCommand(TrayStartCommand startCommand, TrayStopCommand stopCommand, IEnvironment environment, CommonCommandServices services)
Commands\TrayLifecycleService.cs (1)
22IEnvironment environment,
Commands\UpdateCommand.cs (3)
38private readonly IEnvironment _environment; 72IEnvironment environment, 930private static bool IsInPath(string directory, IEnvironment environment)
Completions\CompletionScripts.cs (1)
10internal static string? DetectShell(IEnvironment environment)
DotNet\DotNetCliRunner.cs (1)
211IEnvironment environment) : IDotNetCliRunner
DotNet\DotNetSdkInstaller.cs (3)
14internal sealed class DotNetSdkInstaller(IConfiguration configuration, IEnvironment environment) : IDotNetSdkInstaller 18internal DotNetSdkInstaller(IConfiguration configuration, IEnvironment environment, Func<string, string, ProcessStartInfo> createProcessStartInfo) 114internal static string ResolveDotNetPath(IEnvironment environment) =>
DotNet\ProcessExecution.cs (1)
19IEnvironment hostEnvironment)
DotNet\ProcessExecutionFactory.cs (2)
41private readonly IEnvironment _environment; 44public ProcessExecutionFactory(IEnvironment environment, ILogger<ProcessExecutionFactory> logger)
Git\GitRepository.cs (1)
17internal sealed class GitRepository(CliExecutionContext executionContext, IEnvironment environment, ILogger<GitRepository> logger, ProfilingTelemetry profilingTelemetry) : IGitRepository
HostEnvironment.cs (1)
10/// Default <see cref="IEnvironment"/> that delegates to the process
Layout\LayoutDiscovery.cs (2)
40private readonly IEnvironment _environment; 42public LayoutDiscovery(ILogger<LayoutDiscovery> logger, IEnvironment environment)
Npm\NpmRunner.cs (2)
16internal sealed class NpmRunner(IEnvironment environment, ILogger<NpmRunner> logger, ProfilingTelemetry profilingTelemetry) : INpmRunner 214internal static ProcessStartInfo CreateNpmProcessStartInfo(string npmPath, string[] args, string workingDirectory, IEnvironment environment, SafeFileHandle? standardInput)
NuGet\NuGetClient.cs (2)
134IEnvironment environment, 1355public static void Initialize(NuGetOperationOutput output, INuGetLogger diagnosticLogger, IEnvironment environment)
NuGet\NuGetSignatureVerificationEnabler.cs (2)
26public static void Apply(Dictionary<string, string> environmentVariables, IFeatures features, IEnvironment environment) 55public static IDisposable ApplyToCurrentProcess(IFeatures features, IEnvironment environment)
Processes\ProcessTreeGracefulShutdownService.cs (1)
23IEnvironment environment,
Program.cs (6)
384builder.Services.AddSingleton<IEnvironment, HostEnvironment>(); 387var environment = sp.GetRequiredService<IEnvironment>(); 424sp.GetRequiredService<IEnvironment>()); 493var environment = sp.GetRequiredService<IEnvironment>();
Projects\AppHostCandidateFinder.cs (1)
54IEnvironment environment,
Projects\AppHostConfigurationProjector.cs (1)
12internal sealed class AppHostConfigurationProjector(IConfigurationService configurationService, IEnvironment environment)
Projects\AppHostRpcClient.cs (3)
41IEnvironment environment, 186private static async Task<Stream> ConnectToServerAsync(string socketPath, IEnvironment environment, CancellationToken cancellationToken) 255internal sealed class AppHostRpcClientFactory(IEnvironment environment) : IAppHostRpcClientFactory
Projects\AppHostServerProject.cs (1)
37IEnvironment environment,
Projects\AppHostServerSession.cs (4)
34private readonly IEnvironment _environment; 66IEnvironment environment, 479private readonly IEnvironment _environment; 483public AppHostServerSessionFactory(IEnvironment environment, ILogger<AppHostServerSession> logger, ProfilingTelemetry profilingTelemetry)
Projects\DotNetAppHostProject.cs (2)
56private readonly IEnvironment _environment; 88IEnvironment environment,
Projects\DotNetBasedAppHostServerProject.cs (3)
49private readonly IEnvironment _environment; 61IEnvironment environment, 723internal static (string Os, string Arch) GetBuildPlatform(IEnvironment environment)
Projects\GuestAppHostProject.cs (2)
63private readonly IEnvironment _environment; 89IEnvironment environment,
Projects\GuestRuntime.cs (3)
23private readonly IEnvironment _environment; 43IEnvironment environment, 62public GuestRuntime(RuntimeSpec spec, ILogger logger, Func<string, string?> commandResolver, IEnvironment environment, ProfilingTelemetry profilingTelemetry, IProcessExecutionFactory processExecutionFactory, FileLoggerProvider? fileLoggerProvider = null)
Projects\NativeAppHostServerProject.cs (1)
47IEnvironment environment, IProcessExecutionFactory processes, ILogger logger, CancellationToken cancellationToken)
Projects\PrebuiltAppHostServer.cs (2)
50private readonly IEnvironment _environment; 91IEnvironment environment,
Projects\ProjectLocator.cs (1)
141IEnvironment environment,
Projects\TypeScriptAppHostToolchainResolver.cs (4)
43public static TypeScriptAppHostToolchain Resolve(DirectoryInfo appHostDirectory, IEnvironment environment, ILogger? logger) 54internal static TypeScriptAppHostToolchainResolution ResolveWithReason(DirectoryInfo appHostDirectory, IEnvironment environment) 480private static IEnumerable<DirectoryInfo> EnumerateCandidateDirectories(DirectoryInfo appHostDirectory, IEnvironment environment) 493internal static bool ShouldSearchParentDirectory(DirectoryInfo parentDirectory, IEnvironment environment, string? homeDirectory = null)
Scaffolding\ScaffoldingService.cs (3)
47private readonly IEnvironment _environment; 59IEnvironment environment, 349internal static IReadOnlyList<string> AddRootTypeScriptAppHostDelegateScripts(JsonObject scripts, DirectoryInfo appHostDirectory, string relativeAppHostDirectory, IEnvironment environment, ILogger? logger)
Telemetry\CIEnvironmentDetector.cs (3)
11private readonly IEnvironment _environment; 13public CIEnvironmentDetector(IEnvironment environment) 22public static bool IsCIEnvironment(IEnvironment environment)
Telemetry\CodingAgentDetector.cs (3)
10internal sealed class CodingAgentDetector(IEnvironment environment) : ICodingAgentDetector 51private readonly IEnvironment _environment = environment; 80public bool IsMatch(IEnvironment environment)
Telemetry\TelemetryServiceCollectionExtensions.cs (2)
24sp.GetRequiredService<ILoggerFactory>(), sp.GetRequiredService<IEnvironment>())); 33sp.GetRequiredService<IEnvironment>(), sp.GetRequiredService<TimeProvider>(),
Templating\CliTemplateFactory.cs (2)
73private readonly IEnvironment _environment; 85IEnvironment environment,
Templating\DotNetTemplateFactory.cs (1)
30IEnvironment environment)
Utils\ArchiveHelper.cs (2)
18internal static async Task ExtractAsync(string archivePath, string destinationPath, IEnvironment environment, CancellationToken cancellationToken) 71private static async Task ExtractTarGzSafeAsync(string archivePath, string destinationPath, IEnvironment environment, CancellationToken cancellationToken)
Utils\CliDownloader.cs (1)
21IEnvironment environment,
Utils\CliPathHelper.cs (2)
91internal static string? GetNuGetPackagesEnvironmentPath(IEnvironment environment) 231internal static string NormalizePathCasing(string path, IEnvironment environment)
Utils\EnvironmentChecker\ContainerRuntimeCheck.cs (1)
14internal sealed class ContainerRuntimeCheck(ILogger<ContainerRuntimeCheck> logger, IEnvironment environment) : IEnvironmentCheck
Utils\EnvironmentChecker\DcpConnectionChecker.cs (3)
27IEnvironment environment, 224IEnvironment environment, 410private static void AddDeveloperCertificateArguments(List<string> arguments, CertificateManager certificateManager, IEnvironment environment)
Utils\EnvironmentChecker\DeprecatedWorkloadCheck.cs (2)
17internal sealed class DeprecatedWorkloadCheck(ILogger<DeprecatedWorkloadCheck> logger, IEnvironment environment) : IEnvironmentCheck 24internal DeprecatedWorkloadCheck(ILogger<DeprecatedWorkloadCheck> logger, IEnvironment environment, Func<ProcessStartInfo, CancellationToken, Task<ProcessTextOutput>> runProcess)
Utils\EnvironmentChecker\DevCertsCheck.cs (6)
20internal sealed class DevCertsCheck(ILogger<DevCertsCheck> logger, ICertificateToolRunner certificateToolRunner, IEnvironment environment, IProcessExecutionFactory processExecutionFactory) : IEnvironmentCheck 71IReadOnlyList<DevCertInfo> certInfos, IEnvironment environment) 219private async Task AddLinuxOpenSslCertificateCacheWarningsAsync(List<EnvironmentCheckResult> results, IReadOnlyList<DevCertInfo> certInfos, IEnvironment environment, CancellationToken cancellationToken) 491private static void AddLinuxCertificateToolWarnings(List<EnvironmentCheckResult> results, IEnvironment environment) 517private static Dictionary<string, string> GetEnvironmentVariables(IEnvironment environment) => 561private static string BuildSslCertDirFixCommand(string devCertsTrustPath, IEnvironment environment)
Utils\EnvironmentChecker\OperatingSystemCheck.cs (2)
21public OperatingSystemCheck(IEnvironment environment) 56internal static OperatingSystemDetails GetCurrentOperatingSystemDetails(IEnvironment environment)
Utils\EnvironmentChecker\TypeScriptAppHostToolingCheck.cs (3)
23private readonly IEnvironment _environment; 32IEnvironment environment, 49IEnvironment environment,
Utils\EnvironmentChecker\VsCodeExtensionCheck.cs (8)
31private readonly IEnvironment _environment; 35public VsCodeExtensionCheck(IEnvironment environment, CliExecutionContext executionContext) 42internal VsCodeExtensionCheck(IEnvironment environment, CliExecutionContext executionContext, Func<string, string?> commandResolver) 100internal static VsCodeExtensionDetection Detect(IEnvironment environment, DirectoryInfo homeDirectory) 107internal static VsCodeExtensionDetection Detect(IEnvironment environment, DirectoryInfo homeDirectory, Func<string, string?> commandResolver) 119private static bool IsVsCodeInstalled(IEnvironment environment, Func<string, string?> commandResolver) 133private static bool IsExtensionInstalled(IEnvironment environment, DirectoryInfo homeDirectory) 146private static IEnumerable<string> GetExtensionDirectories(IEnvironment environment, DirectoryInfo homeDirectory)
Utils\EnvironmentChecker\WslEnvironmentCheck.cs (3)
19private readonly IEnvironment _environment; 22public WslEnvironmentCheck(IEnvironment environment) 28internal WslEnvironmentCheck(IEnvironment environment, Func<string?> readProcVersion)
Utils\EnvironmentVariableExtensions.cs (1)
8internal static bool IsFlagEnabled(this IEnvironment environment, string name)
Utils\FileSystemHelper.cs (1)
144internal static Dictionary<string, string> ShortenPaths(IReadOnlyList<string> paths, IEnvironment environment)
Utils\MissingJavaScriptToolWarning.cs (2)
35public static string GetMessage(DirectoryInfo directory, LanguageInfo? language, IEnvironment environment) 41private static (string InstallCommand, string InstallDisplayName) GetMessageParts(DirectoryInfo directory, LanguageInfo? language, IEnvironment environment)
Aspire.Cli.Tests (75)
Acquisition\InstallSourceDetectorTests.cs (1)
275private InstallSourceDetector CreateDetector(string? processPath, IEnvironment environment, IWindowsRegistryReader? registry = null)
Agents\CopilotAppInstallationDetectorTests.cs (1)
135IEnvironment environment,
BundleServiceIntegrationTests.cs (1)
611/// Verifies that the static <see cref="BundleService.ExtractPayloadAsync(Stream, string, IEnvironment, CancellationToken)"/>
Certificates\CertificateServiceTests.cs (9)
206services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 361services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 402services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 493services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 531services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 577services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows(envVars)); 611services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows()); 624private ServiceProvider CreateServiceProvider(TemporaryWorkspace workspace, TestCertificateToolRunner toolRunner, bool nonInteractive = false, IEnvironment? environment = null) 641return new CertificateService(toolRunner, interactiveService, telemetry, hostEnvironment, environment ?? sp.GetRequiredService<IEnvironment>(), executionContext, logger);
Commands\AgentInitClientSelectionTests.cs (19)
175var environment = provider.GetRequiredService<IEnvironment>(); 498services.AddSingleton<IEnvironment>(environment); 622services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?> { [variable] = value })); 664services.AddSingleton<IEnvironment>(environment); 726services.AddSingleton<IEnvironment>(environment); 762services.AddSingleton<IEnvironment>(environment); 800services.AddSingleton<IEnvironment>(new TestEnvironment( 855services.AddSingleton<IEnvironment>(environment); 893services.AddSingleton<IEnvironment>(environment); 920services.AddSingleton<IEnvironment>(environment); 957services.AddSingleton<IEnvironment>(environment); 990services.AddSingleton<IEnvironment>(environment); 1020services.AddSingleton<IEnvironment>(environment); 1052services.AddSingleton<IEnvironment>(environment); 1106services.AddSingleton<IEnvironment>(environment); 1137services.AddSingleton<IEnvironment>(environment); 1176services.AddSingleton<IEnvironment>(environment); 1209services.AddSingleton<IEnvironment>(environment);
Commands\AgentTelemetryCommandTests.cs (1)
102services.AddSingleton<IEnvironment>(new TestEnvironment(new Dictionary<string, string?>
Commands\DashboardRunCommandTests.cs (10)
101var environment = CreateEnvironment(new Dictionary<string, string?> 115var environment = CreateEnvironment(new Dictionary<string, string?>()); 126var environment = CreateEnvironment(new Dictionary<string, string?>()); 555var environment = CreateEnvironment(new Dictionary<string, string?>()); 568var environment = CreateEnvironment(new Dictionary<string, string?> 585var environment = CreateEnvironment(new Dictionary<string, string?>()); 599var environment = CreateEnvironment(new Dictionary<string, string?> 617var environment = CreateEnvironment(new Dictionary<string, string?> 633var environment = CreateEnvironment(new Dictionary<string, string?>()); 728private static IEnvironment CreateEnvironment(Dictionary<string, string?> envVars)
Commands\DeployCommandTests.cs (1)
432services.AddSingleton<IEnvironment>(new TestEnvironment(explicitFile
Commands\TrayCommandTests.cs (4)
206services.AddSingleton<IEnvironment>(platform switch 224services.AddSingleton<IEnvironment>(TestEnvironment.CreateLinux()); 561services.AddSingleton<IEnvironment>(TestEnvironment.CreateMacOS()); 567services.AddSingleton<IEnvironment>(TestEnvironment.CreateWindows());
DotNetSdkInstallerTests.cs (1)
304IEnvironment? environment = null,
NuGet\NuGetSignatureVerificationEnablerTests.cs (6)
13private static IEnvironment CreateEnvironment(Dictionary<string, string?>? envVars = null) 23var environment = CreateEnvironment(); 40var environment = CreateEnvironment(new Dictionary<string, string?>()); // empty env — no user override 58var environment = CreateEnvironment(new Dictionary<string, string?> 79var environment = CreateEnvironment(new Dictionary<string, string?> 100var environment = CreateEnvironment();
Processes\ProcessTreeGracefulShutdownServiceTests.cs (1)
397IEnvironment? environment = null)
Projects\DotNetAppHostProjectTests.cs (2)
4822IEnvironment? environment = null) 4840services.RemoveAll<IEnvironment>();
Projects\GuestAppHostProjectTests.cs (2)
2543IEnvironment? environment = null, 2549var effectiveEnvironment = environment ?? new TestEnvironment();
Projects\ProjectLocatorTests.cs (1)
4260IEnvironment? environment = null,
Telemetry\AspireCliTelemetryTests.cs (1)
816services.AddSingleton<IEnvironment>(new TestEnvironment(environmentVariables));
Telemetry\CIEnvironmentDetectorTests.cs (1)
163services.AddSingleton<IEnvironment>(environment);
TestServices\TestProcessExecutionFactory.cs (1)
22internal static IProcessExecutionFactory CreateForCliGuardian(IEnvironment environment)
Utils\CliTestHelper.cs (10)
233services.AddSingleton<IEnvironment, TestEnvironment>(); 494var environment = serviceProvider.GetRequiredService<IEnvironment>(); 555var environment = serviceProvider.GetRequiredService<IEnvironment>(); 569return new ScaffoldingService(appHostServerProjectFactory, serverSessionFactory, languageDiscovery, interactionService, serviceProvider.GetRequiredService<IEnvironment>(), logger, executionContext, serviceProvider.GetRequiredService<ProfilingTelemetry>(), serviceProvider.GetRequiredService<IFeatures>(), serviceProvider.GetRequiredService<IProcessExecutionFactory>()); 612var environment = serviceProvider.GetRequiredService<IEnvironment>(); 661var cliFactory = new CliTemplateFactory(languageDiscovery, projectFactory, scaffoldingService, prompter, executionContext, interactionService, hostEnvironment, serviceProvider.GetRequiredService<IEnvironment>(), templateNuGetConfigService, cliTemplateLogger); 700return new GitRepository(executionContext, serviceProvider.GetRequiredService<IEnvironment>(), logger, profilingTelemetry);
Utils\DevCertsCheckTests.cs (1)
57private static DevCertsCheck CreateCheck(TestCertificateToolRunner toolRunner, IEnvironment environment, TestProcessExecutionFactory? processExecutionFactory = null) =>
Utils\TestEnvironment.cs (1)
9/// Test <see cref="IEnvironment"/> backed by a dictionary so tests can inject