7847 references to Environment
ArgumentForwarding.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
aspire (34)
Backchannel\ExtensionRpcTarget.cs (1)
45Environment.Exit(ExitCodeConstants.Success);
Commands\PublishCommand.cs (1)
54: Path.Combine(Environment.CurrentDirectory, "aspire-output");
Commands\RootCommand.cs (1)
86$":bug: {string.Format(CultureInfo.CurrentCulture, RootCommandStrings.WaitingForDebugger, Environment.ProcessId)}",
Commands\RunCommand.cs (3)
414var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 416var logFilePath = Path.Combine(logsPath, $"apphost-{Environment.ProcessId}-{DateTime.UtcNow:yyyy-MM-dd-HH-mm-ss}.log");
Commands\UpdateCommand.cs (5)
74var processPath = Environment.ProcessPath; 152var currentExePath = Environment.ProcessPath; 181var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 277var pathEnv = Environment.GetEnvironmentVariable("PATH");
DotNet\DotNetCliRunner.cs (9)
61internal Func<int> GetCurrentProcessId { get; set; } = () => Environment.ProcessId; 336workingDirectory: new DirectoryInfo(Environment.CurrentDirectory), 351workingDirectory: new DirectoryInfo(Environment.CurrentDirectory), 454var lines = stdout.Split(Environment.NewLine); 492workingDirectory: new DirectoryInfo(Environment.CurrentDirectory), 500var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 693Environment.Exit(ExitCodeConstants.Success); 1225var currentPath = startInfo.EnvironmentVariables["PATH"] ?? Environment.GetEnvironmentVariable("PATH") ?? string.Empty;
DotNet\DotNetSdkInstaller.cs (1)
254new DirectoryInfo(Environment.CurrentDirectory),
Packaging\TemporaryNuGetConfig.cs (1)
44NewLineChars = Environment.NewLine,
Program.cs (4)
43var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 71var workingDirectory = new DirectoryInfo(Environment.CurrentDirectory); 183var workingDirectory = new DirectoryInfo(Environment.CurrentDirectory);
Projects\ProjectLocator.cs (3)
58MaxDegreeOfParallelism = Environment.ProcessorCount 242MaxDegreeOfParallelism = Environment.ProcessorCount 461MaxDegreeOfParallelism = Environment.ProcessorCount
Projects\ProjectUpdater.cs (5)
137if (Environment.OSVersion.Platform == PlatformID.Win32NT) 139return path.StartsWith(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); 143var globalNuGetFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget");
Aspire.Azure.AI.Inference (1)
src\Components\Common\AITelemetryHelpers.cs (1)
14Environment.GetEnvironmentVariable("OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT") is string envVar &&
Aspire.Azure.AI.OpenAI (1)
src\Components\Common\AITelemetryHelpers.cs (1)
14Environment.GetEnvironmentVariable("OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT") is string envVar &&
Aspire.Azure.Messaging.EventHubs (2)
AzureMessagingEventHubsSettings.cs (1)
83var envVar = Environment.GetEnvironmentVariable("AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE");
EventHubsComponent.cs (1)
80var identifier = $"{Environment.MachineName}-{eventHubName}-" +
Aspire.Azure.Messaging.ServiceBus (1)
AzureMessagingServiceBusSettings.cs (1)
83var envVar = Environment.GetEnvironmentVariable("AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE");
Aspire.Cli.Tests (9)
CliSmokeTests.cs (2)
33Environment.SetEnvironmentVariable(envVar, loc); 35Environment.SetEnvironmentVariable(envVar, null);
NuGet\NuGetPackagePrefetcherTests.cs (2)
15var workingDir = new DirectoryInfo(Environment.CurrentDirectory); 16var hivesDir = new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "hives"));
TestServices\TestDotNetCliRunner.cs (5)
75return Environment.OSVersion.Platform switch 77PlatformID.Win32NT => [Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "NuGet", "NuGet.Config")], 78_ => [Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "NuGet.Config")],
Aspire.Dashboard (23)
Components\Pages\Traces.razor.cs (3)
114tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTraceId)], trace.TraceId); 125tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTotalTraces)], count); 128tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTotalErroredTraces)], errorCount);
Components_Dialogs_GenAIVisualizerDialog_razor.g.cs (3)
1395FluentUIExtensions.GetClipboardCopyAdditionalAttributes(string.Join(Environment.NewLine + Environment.NewLine, selectedItem.ItemParts.Select(p => p.TextVisualizerViewModel?.FormattedText ?? string.Empty)), ControlsStringsLoc[nameof(ControlsStrings.GridValueCopyToClipboard)], ControlsStringsLoc[nameof(ControlsStrings.GridValueCopied)]) 1558Environment.NewLine +
DashboardWebApplication.cs (4)
915Debug.Assert(_validationFailures.Count == 0, "Validation failures: " + Environment.NewLine + string.Join(Environment.NewLine, _validationFailures)); 921Debug.Assert(_validationFailures.Count == 0, "Validation failures: " + Environment.NewLine + string.Join(Environment.NewLine, _validationFailures));
Model\Assistant\AssistantChatViewModel.cs (4)
245var resolvedMessage = message + Environment.NewLine + Environment.NewLine; 250resolvedMessage = Environment.NewLine + Environment.NewLine + resolvedMessage;
Model\Assistant\PromptContext.cs (1)
51var value = string.Join(Environment.NewLine, uniqueLines);
Model\GenAI\GenAIVisualizerDialogViewModel.cs (2)
107Environment.NewLine + Environment.NewLine,
Model\Markdown\MarkdownProcessor.cs (1)
27pipelineBuilder.ConfigureNewLine(Environment.NewLine);
Model\Otlp\ResourcesSelectHelpers.cs (3)
59""", name, fallback, string.Join(Environment.NewLine, resources), match); 74""", name, string.Join(Environment.NewLine, resources), string.Join(Environment.NewLine, matches));
Model\Otlp\SpanWaterfallViewModel.cs (2)
41tooltip += Environment.NewLine + "Status = Error"; 45tooltip += Environment.NewLine + $"Outgoing call to {UninstrumentedPeer}";
Aspire.Dashboard.Components.Tests (3)
tests\Shared\Logging\XunitLoggerProvider.cs (3)
45private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 96if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 98message = message.Substring(0, message.Length - Environment.NewLine.Length);
Aspire.Dashboard.Tests (6)
tests\Shared\Logging\XunitLoggerProvider.cs (3)
45private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 96if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 98message = message.Substring(0, message.Length - Environment.NewLine.Length);
tests\Shared\Playwright\PlaywrightProvider.cs (3)
19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
Aspire.EndToEnd.Tests (28)
tests\Shared\Playwright\PlaywrightProvider.cs (3)
19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
tests\Shared\TemplatesTesting\AspireProject.cs (3)
310var exceptionMessage = $"{reason}: {Environment.NewLine}{outputMessage}"; 352if (Environment.GetEnvironmentVariable("DASHBOARD_URL_FOR_TEST") is string dashboardUrlForTest) 533msg += $" Content:{Environment.NewLine}{contentStr}";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (9)
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp) 34public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 35public static bool IsRunningOnCIBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 36public static bool IsRunningOnGithubActions => Environment.GetEnvironmentVariable("GITHUB_JOB") is not null; 102string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 108throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 125string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 131throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 174EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
tests\Shared\TemplatesTesting\CommandResult.cs (2)
39_ = message.AppendLine(CultureInfo.InvariantCulture, $"{Environment.NewLine}Standard Output:{Environment.NewLine}{Output}");
tests\Shared\TemplatesTesting\EnvironmentVariables.cs (10)
10public static readonly string? SdkForTemplateTestingPath = Environment.GetEnvironmentVariable("SDK_FOR_TEMPLATES_TESTING_PATH"); 11public static readonly string? TestLogPath = Environment.GetEnvironmentVariable("TEST_LOG_PATH"); 12public static readonly string? SkipProjectCleanup = Environment.GetEnvironmentVariable("SKIP_PROJECT_CLEANUP"); 13public static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH"); 14public static readonly bool ShowBuildOutput = Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is "true"; 16public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true"; 17public static readonly string? TestScenario = Environment.GetEnvironmentVariable("TEST_SCENARIO"); 18public static readonly string? DefaultTFMForTesting = Environment.GetEnvironmentVariable("DEFAULT_TFM_FOR_TESTING"); 19public static readonly string? TestRootPath = Environment.GetEnvironmentVariable("DEV_TEMP"); 20public static readonly bool RunOnlyBasicBuildTemplatesTests = Environment.GetEnvironmentVariable("RunOnlyBasicBuildTemplateTests") is "true";
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
203return string.Join(System.Environment.NewLine, outputLines);
Aspire.Hosting (30)
ApplicationModel\ResourceCommandService.cs (2)
110errorMessage += Environment.NewLine + string.Join(Environment.NewLine, failures.Select(f => $"Resource '{f.resourceId}' failed with error message: {f.result.ErrorMessage}"));
Dashboard\DashboardEventHandlers.cs (1)
823(s, _) => (logMessage.Exception is { } e) ? s + Environment.NewLine + e : s);
Dcp\DcpDependencyCheck.cs (2)
89$"'dcp {arguments}' returned exit code {processResult.ExitCode}. {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}" 117$"{ex.Message} {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}"
Dcp\DcpHost.cs (2)
181var arguments = $"start-apiserver --monitor {Environment.ProcessId} --detach --kubeconfig \"{locations.DcpKubeconfigPath}\""; 212foreach (DictionaryEntry de in Environment.GetEnvironmentVariables())
Devcontainers\DevcontainerSettingsWriter.cs (2)
39Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
DistributedApplication.cs (4)
202if (Environment.GetEnvironmentVariable(KnownConfigNames.WaitForDebugger) == "true") 207if (Environment.GetEnvironmentVariable(KnownConfigNames.WaitForDebuggerTimeout) is string timeoutString && int.TryParse(timeoutString, out var timeoutSeconds)) 214Console.WriteLine($"Waiting for debugger to attach to process: {Environment.ProcessId}"); 218Console.WriteLine($"Timeout waiting for debugger to attach to process: {Environment.ProcessId}");
DistributedApplicationBuilder.cs (2)
757System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile),
Orchestrator\ApplicationOrchestrator.cs (1)
260Url = $"{allocatedEndpoint.UriScheme}://{Environment.MachineName}:{allocatedEndpoint.Port}",
ProjectResourceBuilderExtensions.cs (3)
649var value = Environment.ExpandEnvironmentVariables(envVar.Value); 896var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
Publishing\Internal\FileDeploymentStateManager.cs (2)
40Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
Publishing\Internal\UserSecretsDeploymentStateManager.cs (1)
27null => Environment.GetEnvironmentVariable("DOTNET_USER_SECRETS_ID"),
Publishing\Internal\UserSecretsPathHelper.cs (7)
46string? appData = Environment.GetEnvironmentVariable("APPDATA"); 48?? Environment.GetEnvironmentVariable("HOME") // On Mac/Linux it goes to ~/.microsoft/usersecrets/ 49?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) 50?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) 51?? Environment.GetEnvironmentVariable(userSecretsFallbackDir); // this fallback is an escape hatch if everything else fails
Utils\DotnetSdkUtils.cs (1)
28WorkingDirectory = workingDirectory ?? Environment.CurrentDirectory,
Aspire.Hosting.Azure (8)
Provisioning\Internal\BicepCompiler.cs (1)
75return FindFullPathFromPath(command, Environment.GetEnvironmentVariable("PATH"), File.Exists);
Provisioning\UserSecretsPathHelper.cs (7)
46string? appData = Environment.GetEnvironmentVariable("APPDATA"); 48?? Environment.GetEnvironmentVariable("HOME") // On Mac/Linux it goes to ~/.microsoft/usersecrets/ 49?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) 50?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) 51?? Environment.GetEnvironmentVariable(userSecretsFallbackDir); // this fallback is an escape hatch if everything else fails
Aspire.Hosting.Azure.Kusto.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.Azure.Tests (7)
AzureBicepResourceTests.cs (1)
191bicepResource.Resource.TempDirectory = Environment.CurrentDirectory;
AzureContainerAppsTests.cs (2)
129builder.AddExecutable("api", "node.exe", Environment.CurrentDirectory) 169builder.AddExecutable("api", "node.exe", Environment.CurrentDirectory)
AzureDeployerTests.cs (2)
1144Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
PublicApiTests\AppContainersPublicApiTests.cs (1)
65var executable = builder.AddExecutable("api", "node.exe", Environment.CurrentDirectory);
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.Containers.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.DevTunnels (2)
RequiredCommandValidator.cs (2)
143var pathEnv = Environment.GetEnvironmentVariable("PATH"); 155var pathext = Environment.GetEnvironmentVariable("PATHEXT") ?? ".COM;.EXE;.BAT;.CMD";
Aspire.Hosting.Docker.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.GitHub.Models (1)
GitHubModelsExtensions.cs (1)
37Environment.GetEnvironmentVariable("GITHUB_TOKEN") ??
Aspire.Hosting.Kubernetes.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.Maui.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.OpenAI (1)
OpenAIExtensions.cs (1)
33Environment.GetEnvironmentVariable("OPENAI_API_KEY") ??
Aspire.Hosting.Python.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
446if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out var timeoutInSeconds))
Aspire.Hosting.Testing.Tests (3)
tests\Shared\Logging\XunitLoggerProvider.cs (3)
45private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 96if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 98message = message.Substring(0, message.Length - Environment.NewLine.Length);
Aspire.Hosting.Tests (32)
AppHostSmokeTests.cs (1)
45Environment.SetEnvironmentVariable(envVar, loc);
Dashboard\DashboardLifecycleHookTests.cs (1)
566$"Error message{Environment.NewLine}System.InvalidOperationException: Error!",
Dcp\DcpExecutorTests.cs (18)
233var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 265var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 297var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 330var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 367builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 384builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 418builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 452builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 519var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo"); 610await pipes.StandardOut.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:33.473275911Z Hello world" + Environment.NewLine)); 621await pipes.StandardErr.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:32.661Z Next" + Environment.NewLine)); 664return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:01.000Z First" + Environment.NewLine)); 666return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:02.000Z Second" + Environment.NewLine)); 668return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:03.000Z Third" + Environment.NewLine)); 671"2024-08-19T06:10:05.000Z Sixth" + Environment.NewLine + 672"2024-08-19T06:10:05.000Z Seventh" + Environment.NewLine + 673"2024-08-19T06:10:04.000Z Forth" + Environment.NewLine + 674"2024-08-19T06:10:04.000Z Fifth" + Environment.NewLine));
MSBuildTests.cs (1)
237Assert.True(process.ExitCode == 0, $"Build failed: {Environment.NewLine}{output}");
ProjectResourceTests.cs (1)
496: $",{Environment.NewLine} \"ASPNETCORE_FORWARDEDHEADERS_ENABLED\": \"true\"";
Schema\SchemaTests.cs (1)
772Assert.True(results.IsValid, string.Join(Environment.NewLine, errorMessages ?? ["Schema failed validation with no errors"]));
tests\Shared\Logging\XunitLoggerProvider.cs (3)
45private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 96if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 98message = message.Substring(0, message.Length - Environment.NewLine.Length);
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Utils\ManifestUtils.cs (2)
22manifestDirectory ??= Environment.CurrentDirectory; 54var context = new ManifestPublishingContext(executionContext, Path.Combine(Environment.CurrentDirectory, "manifest.json"), writer);
Utils\UnixSocketHelper.cs (2)
10var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
WithEndpointTests.cs (1)
675url => Assert.StartsWith($"https://{Environment.MachineName}:", url.Url));
Aspire.Hosting.Yarp.Tests (1)
tests\Shared\TestModuleInitializer.cs (1)
16? Path.Combine(Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD")!, "Snapshots")
Aspire.Playground.Tests (10)
AppHostTests.cs (1)
24private static readonly string? s_appHostNameFilter = Environment.GetEnvironmentVariable("TEST_PLAYGROUND_APPHOST_FILTER");
tests\Aspire.TestUtilities\FileUtil.cs (2)
10public static string? FindFullPathFromPath(string command) => FindFullPathFromPath(command, Environment.GetEnvironmentVariable("PATH"), Path.PathSeparator, File.Exists); 25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
tests\Aspire.TestUtilities\PlatformDetection.cs (3)
8public static bool IsRunningOnAzdoBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 9public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 10public static bool IsRunningOnGithubActions => Environment.GetEnvironmentVariable("GITHUB_JOB") is not null;
tests\Aspire.TestUtilities\RequiresPlaywrightAttribute.cs (1)
31if (Environment.GetEnvironmentVariable("PLAYWRIGHT_INSTALLED") is var playwrightInstalled && !string.IsNullOrEmpty(playwrightInstalled))
tests\Shared\Logging\XunitLoggerProvider.cs (3)
45private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 96if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 98message = message.Substring(0, message.Length - Environment.NewLine.Length);
Aspire.Templates.Tests (28)
tests\Shared\Playwright\PlaywrightProvider.cs (3)
19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
tests\Shared\TemplatesTesting\AspireProject.cs (3)
310var exceptionMessage = $"{reason}: {Environment.NewLine}{outputMessage}"; 352if (Environment.GetEnvironmentVariable("DASHBOARD_URL_FOR_TEST") is string dashboardUrlForTest) 533msg += $" Content:{Environment.NewLine}{contentStr}";
tests\Shared\TemplatesTesting\BuildEnvironment.cs (9)
26: Environment.GetEnvironmentVariable("DEV_TEMP") is { } devTemp && Path.Exists(devTemp) 34public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 35public static bool IsRunningOnCIBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 36public static bool IsRunningOnGithubActions => Environment.GetEnvironmentVariable("GITHUB_JOB") is not null; 102string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 108throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 125string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 131throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 174EnvVars["PATH"] = $"{sdkForTemplatePath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
tests\Shared\TemplatesTesting\CommandResult.cs (2)
39_ = message.AppendLine(CultureInfo.InvariantCulture, $"{Environment.NewLine}Standard Output:{Environment.NewLine}{Output}");
tests\Shared\TemplatesTesting\EnvironmentVariables.cs (10)
10public static readonly string? SdkForTemplateTestingPath = Environment.GetEnvironmentVariable("SDK_FOR_TEMPLATES_TESTING_PATH"); 11public static readonly string? TestLogPath = Environment.GetEnvironmentVariable("TEST_LOG_PATH"); 12public static readonly string? SkipProjectCleanup = Environment.GetEnvironmentVariable("SKIP_PROJECT_CLEANUP"); 13public static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH"); 14public static readonly bool ShowBuildOutput = Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is "true"; 16public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true"; 17public static readonly string? TestScenario = Environment.GetEnvironmentVariable("TEST_SCENARIO"); 18public static readonly string? DefaultTFMForTesting = Environment.GetEnvironmentVariable("DEFAULT_TFM_FOR_TESTING"); 19public static readonly string? TestRootPath = Environment.GetEnvironmentVariable("DEV_TEMP"); 20public static readonly bool RunOnlyBasicBuildTemplatesTests = Environment.GetEnvironmentVariable("RunOnlyBasicBuildTemplateTests") is "true";
tests\Shared\TemplatesTesting\ToolCommand.cs (1)
203return string.Join(System.Environment.NewLine, outputLines);
Aspire.TestUtilities (6)
FileUtil.cs (2)
10public static string? FindFullPathFromPath(string command) => FindFullPathFromPath(command, Environment.GetEnvironmentVariable("PATH"), Path.PathSeparator, File.Exists); 25foreach (var extension in Environment.GetEnvironmentVariable("PATHEXT")?.Split(';') ?? Array.Empty<string>())
PlatformDetection.cs (3)
8public static bool IsRunningOnAzdoBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 9public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 10public static bool IsRunningOnGithubActions => Environment.GetEnvironmentVariable("GITHUB_JOB") is not null;
RequiresPlaywrightAttribute.cs (1)
31if (Environment.GetEnvironmentVariable("PLAYWRIGHT_INSTALLED") is var playwrightInstalled && !string.IsNullOrEmpty(playwrightInstalled))
AutobahnTestApp (1)
Program.cs (1)
33else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ASPNETCORE_PORT")))
AzureAppServicesHostingStartupSample (25)
Startup.cs (25)
17await context.Response.WriteAsync("Hello World - " + DateTimeOffset.Now + Environment.NewLine); 18await context.Response.WriteAsync(Environment.NewLine); 20await context.Response.WriteAsync("Address:" + Environment.NewLine); 21await context.Response.WriteAsync("Scheme: " + context.Request.Scheme + Environment.NewLine); 22await context.Response.WriteAsync("Host: " + context.Request.Headers.Host + Environment.NewLine); 23await context.Response.WriteAsync("PathBase: " + context.Request.PathBase.Value + Environment.NewLine); 24await context.Response.WriteAsync("Path: " + context.Request.Path.Value + Environment.NewLine); 25await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine); 26await context.Response.WriteAsync(Environment.NewLine); 28await context.Response.WriteAsync("Connection:" + Environment.NewLine); 29await context.Response.WriteAsync("RemoteIp: " + context.Connection.RemoteIpAddress + Environment.NewLine); 30await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine); 31await context.Response.WriteAsync("LocalIp: " + context.Connection.LocalIpAddress + Environment.NewLine); 32await context.Response.WriteAsync("LocalPort: " + context.Connection.LocalPort + Environment.NewLine); 33await context.Response.WriteAsync("ClientCert: " + context.Connection.ClientCertificate + Environment.NewLine); 34await context.Response.WriteAsync(Environment.NewLine); 36await context.Response.WriteAsync("User: " + context.User.Identity.Name + Environment.NewLine); 37await context.Response.WriteAsync(Environment.NewLine); 39await context.Response.WriteAsync("Headers:" + Environment.NewLine); 42await context.Response.WriteAsync(header.Key + ": " + header.Value + Environment.NewLine); 44await context.Response.WriteAsync(Environment.NewLine); 46await context.Response.WriteAsync("Environment Variables:" + Environment.NewLine); 47var vars = Environment.GetEnvironmentVariables(); 51await context.Response.WriteAsync(key + ": " + value + Environment.NewLine); 53await context.Response.WriteAsync(Environment.NewLine);
AzureAppServicesSample (25)
Startup.cs (25)
28await context.Response.WriteAsync("Hello World - " + DateTimeOffset.Now + Environment.NewLine); 29await context.Response.WriteAsync(Environment.NewLine); 31await context.Response.WriteAsync("Address:" + Environment.NewLine); 32await context.Response.WriteAsync("Scheme: " + context.Request.Scheme + Environment.NewLine); 33await context.Response.WriteAsync("Host: " + context.Request.Headers.Host + Environment.NewLine); 34await context.Response.WriteAsync("PathBase: " + context.Request.PathBase.Value + Environment.NewLine); 35await context.Response.WriteAsync("Path: " + context.Request.Path.Value + Environment.NewLine); 36await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine); 37await context.Response.WriteAsync(Environment.NewLine); 39await context.Response.WriteAsync("Connection:" + Environment.NewLine); 40await context.Response.WriteAsync("RemoteIp: " + context.Connection.RemoteIpAddress + Environment.NewLine); 41await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine); 42await context.Response.WriteAsync("LocalIp: " + context.Connection.LocalIpAddress + Environment.NewLine); 43await context.Response.WriteAsync("LocalPort: " + context.Connection.LocalPort + Environment.NewLine); 44await context.Response.WriteAsync("ClientCert: " + context.Connection.ClientCertificate + Environment.NewLine); 45await context.Response.WriteAsync(Environment.NewLine); 47await context.Response.WriteAsync("User: " + context.User.Identity.Name + Environment.NewLine); 48await context.Response.WriteAsync(Environment.NewLine); 50await context.Response.WriteAsync("Headers:" + Environment.NewLine); 53await context.Response.WriteAsync(header.Key + ": " + header.Value + Environment.NewLine); 55await context.Response.WriteAsync(Environment.NewLine); 57await context.Response.WriteAsync("Environment Variables:" + Environment.NewLine); 58var vars = Environment.GetEnvironmentVariables(); 62await context.Response.WriteAsync(key + ": " + value + Environment.NewLine); 64await context.Response.WriteAsync(Environment.NewLine);
BrowserTelemetry.Web (3)
Pages_Shared__Layout_cshtml.g.cs (3)
194if (Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT") is { Length: > 0 } endpointUrl) 196var headers = Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS"); 197var attributes = Environment.GetEnvironmentVariable("OTEL_RESOURCE_ATTRIBUTES");
BuildActionTelemetryTable (6)
Program.cs (3)
94var currentDirectory = new Uri(Environment.CurrentDirectory + "\\"); 164Console.WriteLine($"The following Actions are new and need their description reviewed:{Environment.NewLine}{string.Join(Environment.NewLine, missingDescriptions)}");
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
BuildValidator (3)
LocalReferenceResolver.cs (3)
90var nugetPackageDirectory = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); 91nugetPackageDirectory ??= Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget");
Client.TypedClient.IntegrationTests (3)
TypedProxyTests.4.0.0.cs (3)
192int startThread = Environment.CurrentManagedThreadId; 195Assert.True(startThread == Environment.CurrentManagedThreadId, String.Format("Expected continuation to happen on thread {0} but actually continued on thread {1}", 196startThread, Environment.CurrentManagedThreadId));
ClientSample (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
CodeStyleConfigFileGenerator (3)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
ConfigurationSchemaGenerator (2)
ConfigSchemaGenerator.cs (2)
35if (!schema.EndsWith(Environment.NewLine)) 38schema += Environment.NewLine;
containerize.UnitTests (3)
ParserTests.cs (2)
212string errorMessage = $"Incorrectly formatted ports:{Environment.NewLine}\t{portStr}:\t{reason}{Environment.NewLine}";
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
CreateDefaultBuilderApp (1)
Program.cs (1)
46var contentRoot = Environment.GetEnvironmentVariable("ASPNETCORE_CONTENTROOT");
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
57var contentRoot = Environment.GetEnvironmentVariable("ASPNETCORE_CONTENTROOT");
Crossgen2Tasks (4)
CommonFilePulledFromSdkRepo\TaskBase.cs (4)
69Environment.NewLine, 73Environment.NewLine); 94s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 103s += Environment.NewLine + stackTrace;
csc (13)
src\Compilers\Shared\BuildClient.cs (1)
154var libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\Csc.cs (1)
18: base(CSharpCommandLineParser.Default, responseFile, args, buildPaths, Environment.GetEnvironmentVariable("LIB"), analyzerLoader)
src\Compilers\Shared\ExitingTraceListener.cs (1)
58Environment.FailFast(message);
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
CSharpSyntaxGenerator (10)
Grammar\GrammarGenerator.cs (7)
95var result = "// <auto-generated />" + Environment.NewLine + "grammar csharp;" + Environment.NewLine; 109result += Environment.NewLine + RuleReference(name).Text + Environment.NewLine + " : " + 110string.Join(Environment.NewLine + " | ", sorted) + Environment.NewLine + " ;" + Environment.NewLine;
Program.cs (3)
172text = text.Replace($"{{{Environment.NewLine}{Environment.NewLine}", $"{{{Environment.NewLine}");
DefaultBuilder.SampleApp (1)
Startup.cs (1)
38var vars = Environment.GetEnvironmentVariables();
DelegationSite (1)
Program.cs (1)
15options.RequestQueueName = Environment.GetEnvironmentVariable("queue");
DeveloperExceptionPageSample (1)
Startup.cs (1)
43"New Line 2", Environment.NewLine,
dotnet (167)
BuildServer\VBCSCompilerServer.cs (1)
61string.Join(Environment.NewLine, errors)));
BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
CommandFactory\CommandResolution\ProjectToolsCommandResolver.cs (2)
116string.Join(Environment.NewLine, possiblePackageRoots.Select((p) => $"- {p}")))); 424stdOut + Environment.NewLine + stdErr));
CommandFactory\CommandResolution\WindowsExePreferredCommandSpecFactory.cs (3)
51var comSpec = Environment.GetEnvironmentVariable("ComSpec") ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe");
Commands\Help\HelpCommand.cs (2)
52FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"),
Commands\Hidden\InternalReportInstallSuccess\InternalReportInstallSuccessCommand.cs (1)
50Environment.GetEnvironmentVariable(TelemetrySessionIdEnvironmentVariableName);
Commands\MSBuild\MSBuildLogger.cs (1)
58Environment.GetEnvironmentVariable(MSBuildForwardingApp.TelemetrySessionIdEnvironmentVariableName);
Commands\New\NewCommandParser.cs (1)
163string? preferredLangEnvVar = Environment.GetEnvironmentVariable(PrefferedLangEnvVarName);
Commands\New\SdkInfoProvider.cs (1)
41: Environment.GetEnvironmentVariable(key),
Commands\Package\PackageCommandParser.cs (1)
59: (Environment.CurrentDirectory, AppKinds.ProjectBased),
Commands\Project\Convert\ProjectConvertCommand.cs (1)
159string defaultValueRelative = Path.GetRelativePath(relativeTo: Environment.CurrentDirectory, defaultValue);
Commands\Run\CSharpCompilerCommand.cs (2)
76Environment.SetEnvironmentVariable("DOTNET_HOST_PATH", new Muxer().MuxerPath); 95identifier: $"dotnet run file {Environment.ProcessId}",
Commands\Run\FileBasedAppSourceEditor.cs (1)
74_ => Environment.NewLine,
Commands\Run\RunCommand.cs (2)
199string value = Environment.ExpandEnvironmentVariables(entry.Value); 460if (rootVariableName != null && string.IsNullOrEmpty(Environment.GetEnvironmentVariable(rootVariableName)))
Commands\Run\VirtualProjectBuildingCommand.cs (7)
293savedEnvironmentVariables[key] = Environment.GetEnvironmentVariable(key); 294Environment.SetEnvironmentVariable(key, value); 390Environment.SetEnvironmentVariable(key, value); 519File.WriteAllText(path: resultOutputFile, contents: result + Environment.NewLine); 621stream.Write(Encoding.UTF8.GetBytes(Environment.NewLine)); 1103: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Commands\Test\MTP\IPC\Serializers\UnknownMessageSerializer.cs (1)
18=> Environment.FailFast("SDK never serializes UnknownMessage. This should never be hit.");
Commands\Test\MTP\Logger.cs (1)
57_traceFilePath = Environment.GetEnvironmentVariable(CliConstants.TestTraceLoggingEnvVar);
Commands\Test\MTP\MicrosoftTestingPlatformTestCommand.cs (3)
109bool inCI = string.Equals(Environment.GetEnvironmentVariable("TF_BUILD"), "true", StringComparison.OrdinalIgnoreCase) || string.Equals(Environment.GetEnvironmentVariable("GITHUB_ACTIONS"), "true", StringComparison.OrdinalIgnoreCase); 137degreeOfParallelism = Environment.ProcessorCount;
Commands\Test\MTP\MSBuildHandler.cs (1)
115string.Join(Environment.NewLine, vsTestTestProjects.Select(module => Path.GetFileName(module.ProjectFullPath))).Red().Bold()));
Commands\Test\MTP\MSBuildUtility.cs (1)
141new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount },
Commands\Test\MTP\SolutionAndProjectUtility.cs (1)
340if (rootVariableName is not null && Environment.GetEnvironmentVariable(rootVariableName) != null)
Commands\Test\MTP\Terminal\NativeMethods.cs (1)
78acceptAnsiColorCodes = AnsiDetector.IsAnsiSupported(Environment.GetEnvironmentVariable("TERM"));
Commands\Test\MTP\TestApplication.cs (4)
103string value = Environment.ExpandEnvironmentVariables(entry.Value); 196Environment.FailFast(exAsString); 255Environment.FailFast(exAsString); 288{ HandshakeMessagePropertyNames.PID, Environment.ProcessId.ToString(CultureInfo.InvariantCulture) },
Commands\Test\MTP\ValidationUtility.cs (1)
74if (Environment.GetEnvironmentVariable("DOTNET_TEST_DISABLE_SWITCH_VALIDATION") is "true" or "1")
Commands\Test\TestCommandParser.cs (1)
183string? globalJsonPath = GetGlobalJsonPath(Environment.CurrentDirectory);
Commands\Test\VSTest\TestCommand.cs (9)
29string testSessionCorrelationId = $"{Environment.ProcessId}_{Guid.NewGuid()}"; 62string? previousNodeWindowSetting = Environment.GetEnvironmentVariable(NodeWindowEnvironmentName); 114Environment.SetEnvironmentVariable(NodeWindowEnvironmentName, previousNodeWindowSetting); 122Environment.SetEnvironmentVariable(NodeWindowEnvironmentName, "1"); 163testSessionCorrelationId = $"{Environment.ProcessId}_{Guid.NewGuid()}"; 383if (Environment.GetEnvironmentVariable("MSBUILDENSURESTDOUTFORTASKPROCESSES") == "1") 464string? liveLoggerArg = Environment.GetEnvironmentVariable("MSBUILDLIVELOGGER"); 465terminalLoggerArg = Environment.GetEnvironmentVariable("MSBUILDTERMINALLOGGER"); 595acceptAnsiColorCodes = AnsiDetector.IsAnsiSupported(Environment.GetEnvironmentVariable("TERM"));
Commands\Test\VSTest\VSTestFeatureFlag.cs (1)
22public bool IsSet(string featureFlag) => _cache.GetOrAdd(featureFlag, f => (Environment.GetEnvironmentVariable(f)?.Trim() ?? "0") != "0");
Commands\Test\VSTest\VSTestForwardingApp.cs (1)
32string vsTestConsolePath = Environment.GetEnvironmentVariable("VSTEST_CONSOLE_PATH");
Commands\Test\VSTest\VSTestTrace.cs (2)
15TraceEnabled = int.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_VSTEST_TRACE"), out int enabled) && enabled == 1; 16s_traceFilePath = Environment.GetEnvironmentVariable("DOTNET_CLI_VSTEST_TRACEFILE");
Commands\Tool\Common\ToolManifestFinderExtensions.cs (1)
44Environment.NewLine,
Commands\Tool\Restore\ToolRestoreCommand.cs (7)
97_reporter.WriteLine(string.Join(Environment.NewLine, e.VerboseMessage).Yellow()); 137Environment.NewLine, 144_reporter.WriteLine(string.Join(Environment.NewLine, successMessage)); 148_errorReporter.WriteLine(Environment.NewLine + 157_reporter.WriteLine(string.Join(Environment.NewLine, 190string.Join(Environment.NewLine, 199throw new ToolPackageException(string.Join(Environment.NewLine, errors));
Commands\VSTest\VSTestCommand.cs (1)
20string testSessionCorrelationId = $"{Environment.ProcessId}_{Guid.NewGuid()}";
Commands\Workload\Clean\WorkloadCleanCommand.cs (1)
100var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(bandedDotnetPath, sdkVersion, _userProfileDir, SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory));
Commands\Workload\Config\WorkloadConfigCommand.cs (1)
56string? globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
Commands\Workload\Install\FileBasedInstaller.cs (1)
58_dotnetDir = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath);
Commands\Workload\Install\MsiInstallerBase.cs (9)
48public static readonly string WorkloadDataRoot = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads"); 118Environment.SpecialFolder programFiles = string.Equals(HostArchitecture, "x86") && Environment.Is64BitOperatingSystem 119? Environment.SpecialFolder.ProgramFilesX86 120: Environment.SpecialFolder.ProgramFiles; 121string dotNetHome = Path.Combine(Environment.GetFolderPath(programFiles), "dotnet"); 377return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "dotnet", "workloads", RuntimeInformation.ProcessArchitecture.ToString(), sdkFeatureBand.ToString(), "history");
Commands\Workload\Install\NetSdkMsiInstallerClient.cs (1)
1122shouldLog ? new TimestampedFileLogger(Path.Combine(Path.GetTempPath(), string.Create(CultureInfo.InvariantCulture, $"Microsoft.NET.Workload_{Environment.ProcessId}_{DateTime.Now:yyyyMMdd_HHmmss_fff}.log")))
Commands\Workload\Install\NetSdkMsiInstallerClient.PackGroup.cs (1)
33if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_DISABLE_PACK_GROUPS)))
Commands\Workload\Install\NetSdkMsiInstallerServer.cs (1)
172!string.Equals(ParentProcess.MainModule.FileName, Environment.ProcessPath, StringComparison.OrdinalIgnoreCase))
Commands\Workload\Install\WorkloadInstallerFactory.cs (2)
30dotnetDir = string.IsNullOrWhiteSpace(dotnetDir) ? Path.GetDirectoryName(Environment.ProcessPath) : dotnetDir; 66dotnetDir ??= Path.GetDirectoryName(Environment.ProcessPath);
Commands\Workload\Install\WorkloadManifestUpdater.cs (4)
54_getEnvironmentVariable = getEnvironmentVariable ?? Environment.GetEnvironmentVariable; 63var dotnetPath = Path.GetDirectoryName(Environment.ProcessPath); 65var workloadManifestProvider = new SdkDirectoryWorkloadManifestProvider(dotnetPath, sdkVersion, userProfileDir, SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory)); 161var backgroundUpdatesDisabled = bool.TryParse(Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_UPDATE_NOTIFY_DISABLE), out var disableEnvVar) && disableEnvVar;
Commands\Workload\Install\WorkloadResolverFactory.cs (2)
36result.DotnetPath = Path.GetDirectoryName(Environment.ProcessPath); 38globalJsonStartDir = globalJsonStartDir ?? Environment.CurrentDirectory;
Commands\Workload\InstallingWorkloadCommand.cs (1)
137_globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
Commands\Workload\Search\WorkloadSearchVersionsCommand.cs (1)
73dotnetDir: Path.GetDirectoryName(Environment.ProcessPath),
Commands\Workload\WorkloadCommandParser.cs (1)
98string dotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath);
Commands\Workload\WorkloadHistoryRecorder.cs (1)
25HistoryRecord.CommandLineArgs = Environment.GetCommandLineArgs();
Commands\Workload\WorkloadInfoHelper.cs (2)
37DotnetPath = dotnetDir ?? Path.GetDirectoryName(Environment.ProcessPath); 48userProfileDir, SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory));
CommonOptions.cs (1)
450: Environment.GetEnvironmentVariable(key));
CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
Extensions\ParseResultExtensions.cs (1)
53message: string.Join(Environment.NewLine,
Installer\Windows\InstallClientElevationContext.cs (1)
34ProcessStartInfo startInfo = new($@"""{Environment.ProcessPath}""",
Installer\Windows\InstallerBase.cs (2)
54protected readonly bool Is64BitProcess = Environment.Is64BitProcess; 200ProcessorArchitecture = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE").ToLowerInvariant();
Installer\Windows\InstallResponseMessage.cs (1)
71Message = e.Message + Environment.NewLine + e.StackTrace,
Installer\Windows\MsiPackageCache.cs (2)
33? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads")
Installer\Windows\SetupLoggerBase.cs (1)
35return $"[{Environment.ProcessId:X8}] {message}";
Installer\Windows\WindowsUtils.cs (1)
31return Uuid.Create($"{processId};{Environment.ProcessPath.ToLowerInvariant()};{Sha256Hasher.Hash(MacAddressGetter.GetMacAddress())};{string.Join(";", values)}")
MsbuildProject.cs (2)
212Environment.SetEnvironmentVariable("DOTNET_HOST_PATH", new Muxer().MuxerPath); 236Environment.SetEnvironmentVariable("DOTNET_HOST_PATH", null);
NugetPackageDownloader\FirstPartyNuGetPackageSigningVerifier.cs (1)
86commandOutput = commandResult.StdOut + Environment.NewLine + commandResult.StdErr;
NugetPackageDownloader\NuGetPackageDownloader.cs (1)
77: bool.TryParse(Environment.GetEnvironmentVariable(NuGetSignatureVerificationEnabler.DotNetNuGetSignatureVerification), out var shouldVerifySignature) ? shouldVerifySignature : OperatingSystem.IsLinux());
PerformanceLogEventListener.cs (2)
74string logFilePath = Path.Combine(logDirectory, $"perf-{Environment.ProcessId}-{Guid.NewGuid().ToString("N")}.log"); 135s_builder.Append($"[{DateTime.UtcNow.ToString("o")}] Event={eventData.EventSource.Name}/{eventData.EventName} ProcessID={Environment.ProcessId} ThreadID={Thread.CurrentThread.ManagedThreadId}\t ");
PerformanceLogEventSource.cs (3)
37EnvironmentInfo(Environment.CommandLine); 193MachineConfiguration(Environment.MachineName, Environment.ProcessorCount);
Program.cs (3)
50Environment.SetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD", "1"); 161Environment.SetEnvironmentVariable(CommandLoggingContext.Variables.Verbose, bool.TrueString); 240NativeWrapper.SdkResolutionResult result = NativeWrapper.NETCoreSdkResolverNativeWrapper.ResolveSdk(string.Empty, Environment.CurrentDirectory);
ReleasePropertyProjectLocator.cs (2)
63if (string.Equals(Environment.GetEnvironmentVariable(EnvironmentVariableNames.DISABLE_PUBLISH_AND_PACK_RELEASE), "true", StringComparison.OrdinalIgnoreCase)) 170if (string.Equals(Environment.GetEnvironmentVariable(EnvironmentVariableNames.DOTNET_CLI_LAZY_PUBLISH_AND_PACK_RELEASE_FOR_SOLUTIONS), "true", StringComparison.OrdinalIgnoreCase))
RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
ShellShim\LinuxEnvironmentPath.cs (1)
21Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_LINUX_PROFILED_PATH") ??
ShellShim\OsxBashEnvironmentPath.cs (1)
25internal static readonly string DotnetCliToolsPathsDPath = Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_OSX_PATHSD_PATH") ?? @"/etc/paths.d/dotnet-cli-tools";
SudoEnvironmentDirectoryOverride.cs (3)
27if (!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("SUDO_UID"))) 40var homeBeforeOverride = Environment.GetEnvironmentVariable(CliFolderPathCalculator.DotnetHomeVariableName); 41Environment.SetEnvironmentVariable(CliFolderPathCalculator.DotnetHomeVariableName, sudoHome);
Telemetry\DevDeviceIDGetter.cs (10)
53string xdgCacheHome = Environment.GetEnvironmentVariable("XDG_CACHE_HOME"); 60cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid"); 71string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid"); 101string xdgCacheHome = Environment.GetEnvironmentVariable("XDG_CACHE_HOME"); 108cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".cache", "deviceid"); 116string cacheFilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "Application Support", "Microsoft", "DeveloperTools", "deviceid");
Telemetry\EnvironmentDetectionRule.cs (4)
37bool.TryParse(Environment.GetEnvironmentVariable(variable), out bool value) && value); 55return _variables.All(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable))); 73return _variables.Any(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable))); 99return _variables.Any(variable => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(variable)))
Telemetry\ExternalTelemetryProperties.cs (2)
62if (GetProductInfo((uint)Environment.OSVersion.Version.Major, (uint)Environment.OSVersion.Version.Minor, 0, 0, out uint productType))
Telemetry\MacAddressGetter.cs (2)
92FileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "getmac.exe"),
Telemetry\PersistenceChannel\StorageTransmission.cs (1)
111if (string.IsNullOrEmpty(content) || content == Environment.NewLine)
Telemetry\TelemetryCommonProperties.cs (1)
70{TelemetryProfile, Environment.GetEnvironmentVariable(TelemetryProfileEnvironmentVariable)},
Telemetry\TelemetryFilter.cs (4)
195Environment.NewLine, 199Environment.NewLine); 220s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 229s += Environment.NewLine + stackTrace;
ToolManifest\ToolManifestEditor.cs (2)
282var joinedWithIndentation = string.Join(Environment.NewLine, 303string.Join(Environment.NewLine, errors.Select(e => "\t" + e))));
ToolManifest\ToolManifestFinder.cs (4)
31_getEnvironmentVariable = getEnvironmentVariable ?? Environment.GetEnvironmentVariable; 44throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, allPossibleManifests.Select(f => "\t" + f.manifestfile.Value)))); 210throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.Value)))); 297throw new ToolManifestCannotBeFoundException(string.Format(CliStrings.CannotFindAManifestFile, string.Join(Environment.NewLine, EnumerateDefaultAllPossibleManifests().Select(f => "\t" + f.manifestfile.Value))));
ToolPackage\ToolPackageDownloader.cs (2)
179currentTargetFramework = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.NetCoreApp, new Version(Environment.Version.Major, Environment.Version.Minor));
dotnet.Tests (86)
BuildServerTests\BuildServerProviderTests.cs (3)
113$"{ProcessId}{Environment.NewLine}{RazorPidFile.RazorServerType}{Environment.NewLine}{serverPath}{Environment.NewLine}{PipeName}")
CommandFactoryTests\GivenAProjectDependencyCommandResolver.cs (3)
17Environment.SetEnvironmentVariable( 21_configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 164Environment.SetEnvironmentVariable(
CommandTests\Build\GivenDotnetBuildBuildsCsproj.cs (2)
29var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 137var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CommandTests\Clean\GivenDotnetCleanCleansBuildArtifacts.cs (1)
23var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CommandTests\MSBuild\GivenDotnetOsArchOptions.cs (3)
29var expectedArch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 140.Execute(command, "--arch", RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86") 168var expectedArch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86";
CommandTests\MSBuild\GivenDotnetVsTestForwardingApp.cs (2)
25Environment.SetEnvironmentVariable(vsTestConsolePath, dummyPath); 31Environment.SetEnvironmentVariable(vsTestConsolePath, null);
CommandTests\New\SdkInfoProviderTests.cs (3)
15string? pathOrig = Environment.GetEnvironmentVariable("PATH"); 16Environment.SetEnvironmentVariable("PATH", dotnetRootUnderTest + Path.PathSeparator + pathOrig); 32Environment.SetEnvironmentVariable("PATH", pathOrig);
CommandTests\Project\Convert\DotnetProjectConvertTests.cs (1)
61.Replace(" <PublishAot>true</PublishAot>" + Environment.NewLine, string.Empty);
CommandTests\Publish\GivenDotnetPublishPublishesProjects.cs (4)
38var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration; 299var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration; 320var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration; 372var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration;
CommandTests\Run\GivenDotnetRootEnv.cs (2)
50if (Environment.Is64BitProcess) 92else if (Environment.Is64BitProcess)
CommandTests\Run\GivenDotnetRunBuildsCsProj.cs (2)
805.HaveStdOutContaining($"0 = a{Environment.NewLine}1 = {Environment.NewLine}2 = c");
CommandTests\Run\RunFileTests.cs (9)
1861? CliCommandStrings.NoBinaryLogBecauseRunningJustCsc + Environment.NewLine 1873prefix = CliCommandStrings.NoBinaryLogBecauseUpToDate + Environment.NewLine; 2441Log.WriteLine(string.Join(Environment.NewLine, normalizedCscOnlyArgs)); 2443Log.WriteLine(string.Join(Environment.NewLine, msbuildArgsToVerify)); 2682BuildLevel.None => CliCommandStrings.NoBinaryLogBecauseUpToDate + Environment.NewLine, 2683BuildLevel.Csc => CliCommandStrings.NoBinaryLogBecauseRunningJustCsc + Environment.NewLine, 2855.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries) 2858.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries) 3471? CliCommandStrings.NoBinaryLogBecauseRunningJustCsc + Environment.NewLine
CommandTests\Solution\Add\GivenDotnetSlnAdd.cs (2)
1301string.Format(CliStrings.SolutionArgumentMisplaced, $"App{solutionExtension}") + Environment.NewLine 1302+ CliStrings.DidYouMean + Environment.NewLine
CommandTests\Solution\Remove\GivenDotnetSlnRemove.cs (3)
329outputText += Environment.NewLine + outputText; 690string.Format(CliStrings.SolutionArgumentMisplaced, $"App{solutionExtension}") + Environment.NewLine 691+ CliStrings.DidYouMean + Environment.NewLine
CommandTests\Store\GivenDotnetStoresAndPublishesProjects.cs (3)
45var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration; 85var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration; 140var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? _defaultConfiguration;
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsproj.cs (3)
201string configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 457result.StdOut + Environment.NewLine + result.StdErr); 654string dotnetRoot = Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)";
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestfromCsprojWithCorrectTestRunParameters.cs (1)
49var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestFromDll.cs (4)
26var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 62var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 77string dotnetRoot = Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"; 92var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsForMultipleTFMs.cs (1)
154var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86";
CommandTests\Test\GivenDotnetTestBuildsAndRunsTestsWithDifferentOptions.cs (3)
221var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 287var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86"; 325var arch = RuntimeInformation.ProcessArchitecture.Equals(Architecture.Arm64) ? "arm64" : Environment.Is64BitOperatingSystem ? "x64" : "x86";
CommandTests\Test\GivenDotnetTestContainsEnvironmentVariables.cs (1)
67var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CommandTests\Test\NamedPipeClient.cs (1)
122Environment.FailFast("[NamedPipeClient] Connection lost with the other side.");
CommandTests\Tool\Install\ToolInstallGlobalOrToolPathCommandTests.cs (1)
329"Simulated error") + Environment.NewLine +
CommandTests\Tool\Restore\ToolRestoreCommandTests.cs (2)
214string.Join(Environment.NewLine, 226string.Join(Environment.NewLine,
CommandTests\Tool\Update\ToolUpdateGlobalOrToolPathCommandTests.cs (1)
380string.Format(CliCommandStrings.UpdateToolFailed, _packageId) + Environment.NewLine +
CommandTests\VSTest\VSTestTests.cs (7)
26var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 57var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 101var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 116string dotnetRoot = Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)"; 126var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug"; 160var testResultsDirectory = new FileInfo(Path.Combine(Environment.CurrentDirectory, "TestResults", logFileName)); 169var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
CompletionTests\DotnetCliSnapshotTests.cs (5)
20if (Environment.GetEnvironmentVariable("USER") is string user && user.Contains("helix", StringComparison.OrdinalIgnoreCase) 21|| string.IsNullOrEmpty(Environment.GetEnvironmentVariable("USER"))) 23Log.WriteLine($"CI environment detected, using snapshots directory in the current working directory {Environment.CurrentDirectory}"); 24settings.UseDirectory(Path.Combine(Environment.CurrentDirectory, "snapshots", provider.ArgumentName)); 28Log.WriteLine($"Using snapshots from local repository because $USER {Environment.GetEnvironmentVariable("USER")} is not helix-related");
CompletionTests\VerifySettings.cs (2)
14if (Environment.GetEnvironmentVariable("CI") is string ci && ci.Equals("true", StringComparison.OrdinalIgnoreCase)) 17directory: Path.Combine(Environment.CurrentDirectory, "snapshots"),
crossgen.Tests.cs (1)
64foreach (string path in (Environment.GetEnvironmentVariable("PATH") ?? "").Split(Path.PathSeparator))
GivenThatICareAboutVBApps.cs (1)
48var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
GivenThatWeWantToBeBackwardsCompatibleWith1xProjects.cs (1)
30var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
ShellShimTests\ShellShimRepositoryTests.cs (2)
471if (Environment.Is64BitProcess) 508var configuration = Environment.GetEnvironmentVariable("CONFIGURATION") ?? "Debug";
TelemetryCommonPropertiesTests.cs (4)
181Environment.SetEnvironmentVariable(key, value); 189Environment.SetEnvironmentVariable(key, null); 202Environment.SetEnvironmentVariable(key, value); 210Environment.SetEnvironmentVariable(key, null);
ToolManifestTests\ToolManifestFinderTests.cs (1)
292("\t\t" + CliStrings.ToolMissingVersion + Environment.NewLine +
dotnet-dev-certs (23)
Program.cs (3)
402"already trusted we will run the following command:" + Environment.NewLine + 404Environment.NewLine + "This command might prompt you for your password to install the certificate " + 405"on the keychain. To undo these changes: 'security remove-trusted-cert <<certificate>>'" + Environment.NewLine);
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
dotnet-format (7)
Commands\FormatCommandCommon.cs (2)
234Environment.Exit(CheckFailedExitCode); 300var currentDirectory = Environment.CurrentDirectory;
Formatters\EndOfLineFormatter.cs (2)
83_ => Environment.NewLine, 94_ => GetEndOfLineOption(Environment.NewLine),
Formatters\FinalNewlineFormatter.cs (1)
34endOfLine = Environment.NewLine;
ReportWriter.cs (1)
40return Path.Combine(Environment.CurrentDirectory, defaultReportName);
Utilities\DotNetHelper.cs (1)
14logger.LogDebug(string.Join(Environment.NewLine, restoreResult.OutputLines));
dotnet-format.UnitTests (17)
Analyzers\AnalyzerAssemblyGenerator.cs (1)
120throw new Exception(string.Join(Environment.NewLine, failures));
CodeFormatterTests.cs (6)
122var logLines = log.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 266var formatLocations = log.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries) 317var formatLocations = log.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries) 663var currentDirectory = Environment.CurrentDirectory; 664Environment.CurrentDirectory = TestProjectsPathHelper.GetProjectsDirectory(); 700Environment.CurrentDirectory = currentDirectory;
Formatters\AbstractFormatterTests.cs (1)
75{string.Join(Environment.NewLine, editorConfig.Select(kvp => $"{kvp.Key} = {kvp.Value}"))}
Formatters\OrganizeImportsFormatterTests.cs (5)
39["end_of_line"] = EndOfLineFormatter.GetEndOfLineOption(Environment.NewLine), 70["end_of_line"] = EndOfLineFormatter.GetEndOfLineOption(Environment.NewLine), 102["end_of_line"] = EndOfLineFormatter.GetEndOfLineOption(Environment.NewLine), 134["end_of_line"] = EndOfLineFormatter.GetEndOfLineOption(Environment.NewLine), 156["end_of_line"] = EndOfLineFormatter.GetEndOfLineOption(Environment.NewLine)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Utilities\DotNetHelper.cs (3)
22output.WriteLine(string.Join(Environment.NewLine, restoreResult.OutputLines)); 36output.WriteLine(string.Join(Environment.NewLine, restoreResult.OutputLines)); 50output.WriteLine(string.Join(Environment.NewLine, restoreResult.OutputLines));
dotnet-getdocument (5)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\GetDocumentInsider\src\ReporterExtensions.cs (2)
31Environment.NewLine, 33.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
dotnet-MsiInstallation.Tests (13)
Framework\VirtualMachine.cs (2)
43var testSettingsFile = Path.Combine(Environment.CurrentDirectory, "VMTestSettings.json"); 80_stateFile = Path.Combine(Environment.CurrentDirectory, "VMState.json");
Framework\VMControl.cs (4)
45_session = CimSession.Create(Environment.MachineName); 60using var session = CimSession.Create(Environment.MachineName); 266exceptionText += Environment.NewLine + 267"ErrorCode: " + job.CimInstanceProperties["ErrorCode"].Value + Environment.NewLine +
Framework\VMTestBase.cs (3)
183return VM.WriteFile(vmVersionFilePath, string.Join(Environment.NewLine, newVersionFileContents)); 231var filteredOutput = string.Join(Environment.NewLine, 232output.Split(Environment.NewLine)
MsiInstallerTests.cs (1)
178Assert.Fail($"Unexpected manifests installed:\r\n{string.Join(Environment.NewLine, unexpectedManifests.Select(m => $"{m.id} {m.version}/{m.featureBand}"))}");
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
WorkloadSetTests.cs (2)
338searchVersionResult.StdOut.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries) 350var actualVersions = searchVersionResult.StdOut.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
dotnet-new.IntegrationTests (26)
CommonTemplatesTests.cs (4)
177string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}"; 348string currentDefaultFramework = $"net{Environment.Version.Major}.{Environment.Version.Minor}";
DotnetNewDetailsTest.cs (4)
37.And.HaveStdOutMatching($"Microsoft.TemplateEngine.TestTemplates{Environment.NewLine} Authors:{Environment.NewLine} Microsoft{Environment.NewLine} Templates:"); 44if (Environment.GetEnvironmentVariable("SYSTEM_TEAMPROJECT") == "internal")
DotnetNewInstantiateTests.cs (1)
245string expectedEol = testCase == "sln" ? "\r\n" : Environment.NewLine;
DotnetNewListTests.cs (7)
435.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new <TEMPLATE_NAME> --search"); 443.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new c --search"); 451.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new c --search"); 477.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new <TEMPLATE_NAME> --search"); 485.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new c --search"); 511.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new <TEMPLATE_NAME> --search"); 519.And.HaveStdErrContaining($"To search for the templates on NuGet.org, run:{Environment.NewLine} dotnet new c --search");
DotnetNewSearchTests.cs (1)
881string[] lines = stdOut?.Split(Environment.NewLine) ?? Array.Empty<string>();
DotnetNewUninstallTests.cs (3)
89.And.HaveStdOutContaining($"Currently installed items:{Environment.NewLine}(No Items)"); 131.And.HaveStdOutContaining($"Currently installed items:{Environment.NewLine}(No Items)"); 194.And.HaveStdOutContaining($"Currently installed items:{Environment.NewLine}(No Items)");
Extensions.cs (3)
12return "StdErr:" + Environment.NewLine + commandResult.StdErr + Environment.NewLine + "StdOut:" + Environment.NewLine + commandResult.StdOut;
PostActionTests.Approval.cs (2)
229return Verify(commandResult.StdOut + Environment.NewLine + commandResult.StdErr); 250return Verify(commandResult.StdOut + Environment.NewLine + commandResult.StdErr)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
dotnet-openapi (4)
DebugMode.cs (1)
19Console.WriteLine("Waiting for debugger in pid: {0}", Environment.ProcessId);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
dotnet-razorpagegenerator (2)
Program.cs (2)
130var diagnostics = string.Join(Environment.NewLine, cSharpDocument.Diagnostics); 131Console.WriteLine($"One or more parse errors encountered. This will not prevent the generator from continuing: {Environment.NewLine}{diagnostics}.");
dotnet-sql-cache (3)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
dotnet-svcutil.xmlserializer (5)
Microsoft\Tools\ServiceModel\SvcUtil\Tool.cs (1)
69System.Environment.Exit((int)ToolExitCodes.Unknown);
Microsoft\Tools\ServiceModel\SvcUtil\ToolConsole.cs (4)
542index += Environment.NewLine.Length; 599if ((index + Environment.NewLine.Length) > text.Length) 604for (int i = 0; i < Environment.NewLine.Length; i++) 606if (Environment.NewLine[i] != text[index + i])
dotnet-svcutil-lib (69)
AppInsightsTelemetryClient.cs (3)
31string optOut = Environment.GetEnvironmentVariable(OptOutVariable); 79if (!bool.TryParse(Environment.GetEnvironmentVariable(testModeVariable), out bool testMode)) 115context.User.Id = GetStableHashCode(Environment.UserName).ToString();
Bootstrapper\SvcutilBootstrapper.cs (1)
206throw new BootstrapException(string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", exception.Message, Environment.NewLine, Resource.BootstrapErrorDisableReferences));
CmdCredentialsProvider.cs (1)
250return separator + Environment.NewLine + certId + cert + separator;
CodeDomFixup\MethodCreationHelper.cs (6)
111indent + "{0} <summary>" + Environment.NewLine + 112indent + "{0} " + SR.ConfigureEndpointCommentSummary + Environment.NewLine + 113indent + "{0} </summary>" + Environment.NewLine + 114indent + "{0} <param name=\"serviceEndpoint\">" + SR.ServiceEndpointComment + "</param>" + Environment.NewLine + 115indent + "{0} <param name=\"clientCredentials\">" + SR.ClientCredentialsComment + "</param>" + Environment.NewLine; 127indent + "Partial Private Shared Sub ConfigureEndpoint(ByVal serviceEndpoint As System.ServiceModel.Description.ServiceEndpoint, ByVal clientCredentials As System.ServiceModel.Description.ClientCredentials)" + Environment.NewLine +
CommandLineParser.cs (1)
141SetValue(options, CommandProcessorOptions.InputsKey, Environment.ExpandEnvironmentVariables(arg));
CommandProcessorOptions.cs (1)
357throw new ToolArgumentException($"{moreThanOneProjectMsg}{Environment.NewLine}{useProjectOptions}");
FrameworkFork\Microsoft.CodeDom\Compiler\RedistVersionInfo.cs (2)
47string comPlus_InstallRoot = Environment.GetEnvironmentVariable("COMPLUS_InstallRoot"); 48string comPlus_Version = Environment.GetEnvironmentVariable("COMPLUS_Version");
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
499b.Append(Environment.NewLine);
FrameworkFork\Microsoft.Xml\Xml\Core\SecureStringHasher.cs (1)
38_hashCodeRandomizer = Environment.TickCount;
FrameworkFork\Microsoft.Xml\Xml\Core\XmlWriterSettings.cs (1)
691_newLineChars = Environment.NewLine; // "\r\n" on Windows, "\n" on Unix
FrameworkFork\Microsoft.Xml\Xml\NameTable.cs (1)
56_hashCodeRandomizer = Environment.TickCount;
FrameworkFork\Microsoft.Xml\Xml\Serialization\SchemaObjectWriter.cs (1)
196_w.Append(Environment.NewLine);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriter.cs (4)
1680if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 2254if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.TypeDesc.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 2292if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 3376if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace);
FrameworkFork\Microsoft.Xml\Xml\Serialization\XmlSerializationWriterILGen.cs (4)
132if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 772if (methodName == null) throw new InvalidOperationException("deriaved from " + mapping.TypeDesc.FullName + ", " + string.Format(ResXml.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 823if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 2111if (methodName == null) throw new InvalidOperationException(string.Format(ResXml.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace);
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\DataContractSet.cs (1)
468errorMessage.AppendFormat("{0}\"{1}\" ", Environment.NewLine, conflictingType.AssemblyQualifiedName);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\AssertHelper.cs (1)
42Environment.FailFast(message);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\Fx.cs (1)
170Environment.FailFast(failFastMessage);
FrameworkFork\System.ServiceModel\Internals\System\Runtime\SynchronizedPool.cs (3)
211int thisThreadID = Environment.CurrentManagedThreadId; 264int thisThreadID = Environment.CurrentManagedThreadId; 339return Environment.ProcessorCount;
FrameworkFork\System.ServiceModel\Internals\System\Runtime\TimeoutHelper.cs (1)
284uint currentTime = (uint)Environment.TickCount;
FrameworkFork\System.ServiceModel\System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
424Environment.NewLine,
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\TransportDefaults.cs (3)
214return 12 * Environment.ProcessorCount; 219return 2 * Environment.ProcessorCount; 235return 12 * Environment.ProcessorCount;
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\UdpConstants.cs (1)
41public static readonly long MaxPendingMessagesTotalSize = 1024 * 1024 * Environment.ProcessorCount; // 512 * 2K messages per processor
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\DataProtectionSecurityStateEncoder.cs (2)
62result.AppendFormat("{0} UseCurrentUserProtectionScope={1}", Environment.NewLine, _useCurrentUserProtectionScope); 63result.AppendFormat("{0} Entropy Length={1}", Environment.NewLine, (_entropy == null) ? 0 : _entropy.Length);
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\TimeBoundedCache.cs (3)
308Environment.FailFast("Cache write lock is not held."); 370Environment.FailFast("Cache write lock is not held."); 387Environment.FailFast("Cache write lock is not held.");
HelpGenerator.cs (4)
364index += Environment.NewLine.Length; 421if ((index + Environment.NewLine.Length) > text.Length) 426for (int i = 0; i < Environment.NewLine.Length; i++) 428if (Environment.NewLine[i] != text[index + i])
Metadata\MetadaExchangeResolver.cs (1)
347_currentRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol " + System.Environment.Version.ToString() + ")";
Shared\Options\OptionsSerializer.cs (1)
205var separator = prettyFormat ? Environment.NewLine : " ";
Shared\ProjectPropertyResolver.cs (1)
98await safeLogger.WriteErrorAsync($"{ex.Message}{Environment.NewLine}{ex.StackTrace}", logToUI: false);
Shared\Utilities\DebugUtils.cs (4)
19set { Environment.SetEnvironmentVariable(SvcutilKeepBootstrapDirEnvVar, value ? "1" : string.Empty); } 20get { return Int32.TryParse(Environment.GetEnvironmentVariable(SvcutilKeepBootstrapDirEnvVar), out int ret) ? (ret > 0 ? true : false) : false; } 30set { Environment.SetEnvironmentVariable(SvcutilDebugVariableEnvVar, value.ToString(CultureInfo.InvariantCulture)); } 31get { return Int32.TryParse(Environment.GetEnvironmentVariable(SvcutilDebugVariableEnvVar), out int ret) ? ret : 0; }
Shared\Utilities\ProcessRunner.cs (2)
66using (var safeLogger = await SafeLogger.WriteStartOperationAsync(logger, $"Executing command [\"{currentDir}\"]{Environment.NewLine}>{processName} {processArgs}").ConfigureAwait(false)) 115Console.WriteLine($"{Path.GetFileName(currentDir)}>{processName} {processArgs}{Environment.NewLine}");
Shared\Utilities\RuntimeEnvironmentHelper.cs (6)
62"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + 63"<configuration>" + Environment.NewLine + 64" <packageSources>" + Environment.NewLine + 65" <add key = \"svcutilFeed\" value=\"{0}\" />" + Environment.NewLine + 66" </packageSources>" + Environment.NewLine + 67"</configuration>" + Environment.NewLine;
Shared\Utilities\Utilities.cs (1)
43message.Append(string.Concat(Environment.NewLine, exMsg, includeStackTrace ? e.StackTrace : string.Empty));
ToolConsole.cs (4)
128str = str.Replace("\\r\\n", Environment.NewLine); 135str = logTag + str.Replace(Environment.NewLine, newLineReplacement); 166WriteWarning(conversionError.Message.Replace("\r\n", Environment.NewLine).Trim(trimLFNL)); 170WriteError(conversionError.Message.Replace("\r\n", Environment.NewLine).Trim(trimLFNL));
dotnet-svcutil-lib.Tests (84)
E2ETests.cs (1)
54_ = $"{processResult.OutputText}{Environment.NewLine}{((TestLogger)this_TestCaseLogger)}";
FixupUtil.cs (3)
15static readonly string s_programFilesx64 = Environment.GetEnvironmentVariable("ProgramW6432")?.Replace('\\', '/'); 44new ReplaceInfo(Environment.GetEnvironmentVariable("USERPROFILE"), "$USERPROFILE$"), 86_replacements.Add(new ReplaceInfo(Environment.GetEnvironmentVariable("HOME"), "$USERPROFILE$"));
GlobalToolTests.cs (1)
23var outputText = $"{processResult.OutputText}{Environment.NewLine}{((TestLogger)this_TestCaseLogger)}";
ProjectUtils.cs (2)
73Assert.True(ret.ExitCode == 0, $"Project package restore failed:{Environment.NewLine}{ret.OutputText}{logger}"); 78Assert.True(ret.ExitCode == 0, $"Project build failed:{Environment.NewLine}{ret.OutputText}{logger}");
TestInit.cs (44)
186Assert.True(ret.ExitCode == 0, "Could not install the global tool." + Environment.NewLine + ret.OutputText); 294Environment.NewLine + Environment.NewLine + "Error: The generated file doesn't match the baseline! Different lines:" + 295Environment.NewLine + "< \"{0}\"" + 296Environment.NewLine + "> \"{1}\"" + Environment.NewLine + 297Environment.NewLine + " windiff \"{2}\" \"{3}\"" + Environment.NewLine + 298Environment.NewLine + "To update the baseline run the following command:" + 299Environment.NewLine + " copy /y \"{3}\" \"{2}\""; 302Environment.NewLine + Environment.NewLine + "Error: A file was generated but no baseline exists!" + 303Environment.NewLine + "The \"{0}\" file was created and need to be committed into the source repo. Rerunning the test should succeed if no other error occurred!"; 306Environment.NewLine + Environment.NewLine + "No generated file was found matching the following baselines:" + Environment.NewLine + "{0}" + 307Environment.NewLine + "If no longer valid, run the following command script to delete them:" + Environment.NewLine + " {1}"; 310Environment.NewLine + Environment.NewLine + "To reproduce the problem run the following commands:" + Environment.NewLine + 311Environment.NewLine + " pushd {0}" + Environment.NewLine + 312Environment.NewLine + " dotnet svcutil {1}"; 315Environment.NewLine + "Command: dotnet svcutil {0}" + 316Environment.NewLine + "Workdir: {1}"; 318public static readonly string g_GeneralErrMsg = $"{Environment.NewLine}{Environment.NewLine}Click the Output link for a full report."; 328var resultsMsg = Environment.NewLine + $"Svcutil Result: {actualText}. Expected: {expectedText}"; 332var logText = $"{Environment.NewLine}{outputText}{Environment.NewLine}{Environment.NewLine}{commandMsg}{resultsMsg}"; 337Assert.True(isTestSucess, $"{Environment.NewLine}Test failed:{Environment.NewLine}{outputText}{g_GeneralErrMsg}"); 343Assert.True(validationSuccess, $"{Environment.NewLine}Test failed validation!{failureMessage}{g_GeneralErrMsg}"); 461.Aggregate((msg, b) => $"{msg}{Environment.NewLine}{b}"), scriptPath); 611"<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine + 612"<configuration>" + Environment.NewLine + 613" <packageSources>" + Environment.NewLine + 614" <clear />" + Environment.NewLine + 615" <add key = \"svcutilTestFeed\" value=\"$svcutilTestFeed$\" />" + Environment.NewLine + 616" <add key = \"dotnet-public\" value=\"https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json\" />" + Environment.NewLine + 617" </packageSources>" + Environment.NewLine + 618"</configuration>" + Environment.NewLine;
TestLogger.cs (1)
13static readonly string programFilesx64 = Environment.GetEnvironmentVariable("ProgramW6432")?.Replace('\\', '/');
UnitTest.cs (32)
253Environment.NewLine + cmdOptions.Errors.Select(e => e.Message).Aggregate((errors, e) => $"{errors}{Environment.NewLine}{e}"); 255Environment.NewLine + cmdOptions.Warnings.Aggregate((warnings, w) => $"{warnings}{Environment.NewLine}{w}"); 258var log = $"{Environment.NewLine}Input options:{Environment.NewLine}{options}{Environment.NewLine}" + 259$"{Environment.NewLine}Output JSON:{Environment.NewLine}{cmdOptions.Json}{Environment.NewLine}" + 260$"{Environment.NewLine}Output options:{Environment.NewLine}{optionsString}{Environment.NewLine}" + 261$"{Environment.NewLine}Parsing warnings:{cmdwarnings}{Environment.NewLine}" + 262$"{Environment.NewLine}Parsing errors:{cmderrors}{Environment.NewLine}"; 268log += $"{Environment.NewLine}{cmdOptions.GetType().Name} as {updateOptions.GetType().Name}:{Environment.NewLine}{updateOptions.Json}"; 299Environment.NewLine + cmdOptions.Errors.Select(e => e.Message).Aggregate((errors, e) => $"{errors}{Environment.NewLine}{e}"); 301Environment.NewLine + cmdOptions.Warnings.Aggregate((warnings, w) => $"{warnings}{Environment.NewLine}{w}"); 304var log = $"{Environment.NewLine}Input options:{Environment.NewLine}{options}{Environment.NewLine}" + 305$"{Environment.NewLine}Output options:{Environment.NewLine}{optionsString}{Environment.NewLine}" + 306$"{Environment.NewLine}{cmdwarnings}" + 307$"{Environment.NewLine}{cmderrors}"; 355errorMessage = $"{options.GetType().Name} did not pass serialization roundtrip!{Environment.NewLine} windiff {jsonFileSrcPath} {outJsonFile}";
dotnet-user-jwts (16)
Commands\CreateCommand.cs (12)
136var optionsString = schemeNameOption.HasValue() ? $"{Resources.JwtPrint_Scheme}: {scheme}{Environment.NewLine}" : string.Empty; 138var name = nameOption.HasValue() ? nameOption.Value() : Environment.UserName; 139optionsString += $"{Resources.JwtPrint_Name}: {name}{Environment.NewLine}"; 142optionsString += audienceOption.HasValue() ? $"{Resources.JwtPrint_Audiences}: {string.Join(", ", audience)}{Environment.NewLine}" : string.Empty; 149optionsString += issuerOption.HasValue() ? $"{Resources.JwtPrint_Issuer}: {issuer}{Environment.NewLine}" : string.Empty; 159optionsString += $"{Resources.JwtPrint_NotBefore}: {notBefore:O}{Environment.NewLine}"; 178optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 198optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 203optionsString += rolesOption.HasValue() ? $"{Resources.JwtPrint_Roles}: [{string.Join(", ", roles)}]{Environment.NewLine}" : string.Empty; 206optionsString += scopesOption.HasValue() ? $"{Resources.JwtPrint_Scopes}: {string.Join(", ", scopes)}{Environment.NewLine}" : string.Empty; 216optionsString += $"{Resources.JwtPrint_CustomClaims}: [{string.Join(", ", claims.Select(kvp => $"{kvp.Key}={kvp.Value}"))}]{Environment.NewLine}"; 224optionsString += appsettingsFileOption.HasValue() ? $"{Resources.JwtPrint_appsettingsFile}: {appsettingsFile}{Environment.NewLine}" : string.Empty;
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
64propertyGroup.Add($"{Environment.NewLine} ");
dotnet-user-secrets (4)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
src\Tools\Shared\SecretsHelpers\UserSecretsCreator.cs (1)
64propertyGroup.Add($"{Environment.NewLine} ");
dotnet-watch (10)
CommandLine\EnvironmentOptions.cs (1)
74var muxerPath = Environment.ProcessPath;
CommandLine\EnvironmentVariables.cs (8)
31Environment.GetEnvironmentVariable("DOTNET_WATCH_DEBUG_SDK_DIRECTORY") ?? ""; 41public static TestFlags TestFlags => Environment.GetEnvironmentVariable("__DOTNET_WATCH_TEST_FLAGS") is { } value ? Enum.Parse<TestFlags>(value) : TestFlags.None; 42public static string TestOutputDir => Environment.GetEnvironmentVariable("__DOTNET_WATCH_TEST_OUTPUT_DIR") ?? ""; 44public static string? AutoReloadWSHostName => Environment.GetEnvironmentVariable("DOTNET_WATCH_AUTO_RELOAD_WS_HOSTNAME"); 46public static string? BrowserPath => Environment.GetEnvironmentVariable("DOTNET_WATCH_BROWSER_PATH"); 49=> Environment.GetEnvironmentVariable(variableName) is var value && (value == "1" || bool.TryParse(value, out var boolValue) && boolValue); 52=> Environment.GetEnvironmentVariable(variableName) is var value && long.TryParse(value, out var intValue) && intValue >= 0 ? TimeSpan.FromMilliseconds(intValue) : null; 55=> Environment.GetEnvironmentVariable(variableName) is var value && int.TryParse(value, out var intValue) ? intValue : null;
Program.cs (1)
174Environment.Exit(0);
dotnet-watch.Tests (14)
CommandLine\LaunchSettingsTests.cs (4)
22Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_WATCH")), "DOTNET_WATCH cannot be set already when this test is running"); 35Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE")), "DOTNET_LAUNCH_PROFILE cannot be set already when this test is running"); 53Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE")), "DOTNET_LAUNCH_PROFILE cannot be set already when this test is running"); 73Assert.True(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE")), "DOTNET_LAUNCH_PROFILE cannot be set already when this test is running");
ConsoleReporterTests.cs (1)
10private static readonly string EOL = Environment.NewLine;
HotReload\CompilationHandlerTests.cs (1)
20var environmentOptions = TestOptions.GetEnvironmentOptions(Environment.CurrentDirectory, "dotnet");
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
TestUtilities\AssertEx.cs (4)
120Fail("expected was null, but actual wasn't" + Environment.NewLine + message); 124Fail("actual was null, but expected wasn't" + Environment.NewLine + message); 135Fail(message + Environment.NewLine + expectedAndActual); 182itemSeparator ??= (typeof(T) == typeof(byte)) ? ", " : "," + Environment.NewLine;
TestUtilities\AwaitableProcess.cs (1)
14private static readonly TimeSpan s_timeout = Environment.GetEnvironmentVariable("HELIX_WORK_ITEM_TIMEOUT") is { } value
TestUtilities\MockFileSetFactory.cs (1)
12new BuildReporter(NullLogger.Instance, new GlobalOptions(), TestOptions.GetEnvironmentOptions(Environment.CurrentDirectory, "dotnet") is var options ? options : options))
TestUtilities\TestOptions.cs (1)
30=> Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot
EndToEnd.Tests (3)
GivenDotNetLinuxInstallers.cs (1)
11var installerFile = Environment.GetEnvironmentVariable("SDK_INSTALLER_FILE");
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
ProjectBuildTests.cs (1)
207expectedOutput += Environment.NewLine;
EventHubsConsumer (1)
Program.cs (1)
9bool useConsumer = Environment.GetEnvironmentVariable("USE_EVENTHUBCONSUMERCLIENT") == "yes";
ExampleTask (1)
ExampleTask.cs (1)
26string[] args = Environment.GetCommandLineArgs();
finalizer (4)
Program.cs (4)
286string programDataPath = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); 315var pid = Environment.ProcessId; 316var tid = Environment.CurrentManagedThreadId;
GenerateDocumentationAndConfigFiles (1)
ObjectPool.cs (1)
110: this(factory, Environment.ProcessorCount * 2)
GetDocument.Insider (7)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-rc.1.25524.106\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
33if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds))
Commands\GetDocumentCommandWorker.cs (1)
311writer.WriteLine(string.Join(Environment.NewLine, filePathList));
ReporterExtensions.cs (2)
31Environment.NewLine, 33.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Tools\Shared\CommandLine\CliContext.cs (1)
20bool.TryParse(Environment.GetEnvironmentVariable("DOTNET_CLI_CONTEXT_VERBOSE"), out bool globalVerbose);
src\Tools\Shared\CommandLine\DebugHelper.cs (1)
24Console.WriteLine($"Process ID: {Environment.ProcessId}");
HealthChecksSample (1)
LivenessProbeStartup.cs (1)
60await context.Response.WriteAsync(Environment.NewLine);
HelixTasks (1)
SDKCustomCreateXUnitWorkItemsWithTestExclusion.cs (1)
150var scheduler = new AssemblyScheduler(methodLimit: !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TestFullMSBuild")) ? 32 : 16);
HelixTestRunner (20)
HelixTestRunnerOptions.cs (3)
77DotnetRoot = Environment.GetEnvironmentVariable("DOTNET_ROOT"), 78HELIX_WORKITEM_ROOT = Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), 79Path = Environment.GetEnvironmentVariable("PATH"),
ProcessUtil.cs (6)
25var dumpDirectoryPath = Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"); 40var dumpDirectoryPath = Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"); 62if (!File.Exists($"{Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")}/dotnet-dump") && 63!File.Exists($"{Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")}/dotnet-dump.exe")) 68return RunAsync($"{Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")}/dotnet-dump", $"collect -p {pid} -o \"{dumpFilePath}\""); 103dumpDirectoryPath ??= Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER");
Program.cs (4)
43Environment.Exit(1); 56Environment.Exit(exitCode); 60Environment.Exit(1); 65Environment.Exit(1);
TestRunner.cs (7)
41var dumpPath = Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"); 49var playwrightBrowsers = Environment.GetEnvironmentVariable("PLAYWRIGHT_BROWSERS_PATH"); 107ProcessUtil.PrintMessage($"Installing Playwright Browsers to {Environment.GetEnvironmentVariable("PLAYWRIGHT_BROWSERS_PATH")}"); 111DisplayContents(Environment.GetEnvironmentVariable("PLAYWRIGHT_BROWSERS_PATH")); 125var correlationPayload = Environment.GetEnvironmentVariable("HELIX_CORRELATION_PAYLOAD"); 231var diagLog = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"), "vstest.log"); 302var HELIX_WORKITEM_UPLOAD_ROOT = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
HotAddSample (1)
Startup.cs (1)
52await context.Response.WriteAsync(ex.ToString().Replace(Environment.NewLine, "<br>"));
Http2SampleApp (1)
Program.cs (1)
79Console.WriteLine($"Process ID: {Environment.ProcessId}");
IdeBenchmarks (5)
InheritanceMargin\InheritanceMarginGlyphBenchmarks.cs (3)
197builder.Append(Environment.NewLine); 207builder.Append(Environment.NewLine); 219builder.Append(Environment.NewLine);
InheritanceMargin\InheritanceMarginServiceBenchmarks.cs (1)
35var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
Program.cs (1)
34Environment.SetEnvironmentVariable(RoslynRootPathEnvVariableName, GetRoslynRootLocation());
IdeCoreBenchmarks (22)
ClassificationBenchmarks.cs (2)
44var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 54var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
CSharpIdeAnalyzerBenchmarks.cs (1)
36var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
FindReferencesBenchmarks.cs (2)
43var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 53var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
FormatterBenchmarks.cs (8)
29var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 39.Replace($"{{{Environment.NewLine}{Environment.NewLine}", "{") 40.Replace($"}}{Environment.NewLine}{Environment.NewLine}", "}") 41.Replace($"{{{Environment.NewLine}", "{") 42.Replace($"}}{Environment.NewLine}", "}") 43.Replace($";{Environment.NewLine}", ";");
IncrementalAnalyzerBenchmarks.cs (1)
35var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
IncrementalSourceGeneratorBenchmarks.cs (3)
46var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 56var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 176Environment.Exit(0);
NavigateToBenchmarks.cs (2)
47var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 57var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
Program.cs (1)
42Environment.SetEnvironmentVariable(RoslynRootPathEnvVariableName, GetRoslynRootLocation());
RenameBenchmarks.cs (1)
27var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
SyntacticChangeRangeBenchmark.cs (1)
32var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
IIS.Common.TestLib (7)
TestConnections.cs (7)
149$"Did not receive a complete response within {Timeout}.{Environment.NewLine}{Environment.NewLine}" + 150$"Expected:{Environment.NewLine}{length} bytes of data{Environment.NewLine}{Environment.NewLine}" + 151$"Actual:{Environment.NewLine}{Encoding.ASCII.GetString(actual, 0, offset)}{Environment.NewLine}",
IIS.FunctionalTests (19)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (2)
49var username = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_USER"); 50var password = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_PASSWORD");
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
48var message = i + Environment.NewLine; 90var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
164if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 233if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0))
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (5)
35if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") 55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS) 61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml"); 65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml"); 95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
259var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (2)
60Assert.Contains(Environment.UserName, responseText); 101Assert.Contains(Environment.UserName, responseText);
IIS.LongTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (5)
35if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") 55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS) 61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml"); 65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml"); 95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
IIS.NewHandler.FunctionalTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (5)
35if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") 55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS) 61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml"); 65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml"); 95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
IIS.NewShim.FunctionalTests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (5)
35if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") 55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS) 61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml"); 65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml"); 95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
IIS.ShadowCopy.Tests (10)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (5)
35if (Environment.GetEnvironmentVariable("ASPNETCORE_TEST_SKIP_IIS") == "true") 55if (!File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", "w3wp.exe")) && !SkipInVSTSAttribute.RunningInVSTS) 61var ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema.xml"); 65ancmConfigPath = Path.Combine(Environment.SystemDirectory, "inetsrv", "config", "schema", "aspnetcore_schema_v2.xml"); 95if (File.Exists(Path.Combine(Environment.SystemDirectory, "inetsrv", module.DllName)) || SkipInVSTSAttribute.RunningInVSTS)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
IIS.Tests (3)
TlsHandshakeFeatureTests.cs (1)
55if (Environment.OSVersion.Version > new Version(10, 0, 19043, 0))
Utilities\TestServer.cs (2)
32internal static string HostableWebCoreLocation => Environment.ExpandEnvironmentVariables($@"%windir%\system32\inetsrv\{HWebCoreDll}"); 35Environment.Is64BitProcess ? "x64" : "x86");
IISExpress.FunctionalTests (15)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (2)
49var username = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_USER"); 50var password = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_PASSWORD");
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
48var message = i + Environment.NewLine; 90var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
164if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 233if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0))
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\AppVerifier.cs (2)
18var enabledCodes = (Environment.GetEnvironmentVariable("APPVERIFIER_ENABLED_CODES") ?? "").Split(' '); 80RunProcessAndWaitForExit("appverif.exe", $"-configure {_codes} -for {_processName} -with ErrorReport={Environment.GetEnvironmentVariable("APPVERIFIER_LEVEL")}", AppVerifierCommandTimeout);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\Helpers.cs (1)
227"Running test allowed log file to be empty." + Environment.NewLine);
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresEnvironmentVariableAttribute.cs (1)
20public bool IsMet => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(_name));
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\SkipVSTSAttribute.cs (1)
13public static bool RunningInVSTS = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_TASKDEFINITIONSURI"));
src\Servers\IIS\IIS\test\Common.FunctionalTests\RequestResponseTests.cs (1)
259var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (2)
60Assert.Contains(Environment.UserName, responseText); 101Assert.Contains(Environment.UserName, responseText);
UpgradeFeatureDetectionTests.cs (1)
19private readonly string _isWebsocketsSupported = Environment.OSVersion.Version >= new Version(6, 2) ? "Enabled" : "Disabled";
IISSample (26)
Startup.cs (26)
42await context.Response.WriteAsync("Hello World - " + DateTimeOffset.Now + Environment.NewLine); 43await context.Response.WriteAsync(Environment.NewLine); 45await context.Response.WriteAsync("Address:" + Environment.NewLine); 46await context.Response.WriteAsync("Scheme: " + context.Request.Scheme + Environment.NewLine); 47await context.Response.WriteAsync("Host: " + context.Request.Headers["Host"] + Environment.NewLine); 48await context.Response.WriteAsync("PathBase: " + context.Request.PathBase.Value + Environment.NewLine); 49await context.Response.WriteAsync("Path: " + context.Request.Path.Value + Environment.NewLine); 50await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine); 51await context.Response.WriteAsync(Environment.NewLine); 53await context.Response.WriteAsync("Connection:" + Environment.NewLine); 54await context.Response.WriteAsync("RemoteIp: " + context.Connection.RemoteIpAddress + Environment.NewLine); 55await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine); 56await context.Response.WriteAsync("LocalIp: " + context.Connection.LocalIpAddress + Environment.NewLine); 57await context.Response.WriteAsync("LocalPort: " + context.Connection.LocalPort + Environment.NewLine); 58await context.Response.WriteAsync("ClientCert: " + context.Connection.ClientCertificate + Environment.NewLine); 59await context.Response.WriteAsync(Environment.NewLine); 61await context.Response.WriteAsync("User: " + context.User.Identity.Name + Environment.NewLine); 63await context.Response.WriteAsync("DisplayName: " + scheme?.DisplayName + Environment.NewLine); 64await context.Response.WriteAsync(Environment.NewLine); 66await context.Response.WriteAsync("Headers:" + Environment.NewLine); 69await context.Response.WriteAsync(header.Key + ": " + header.Value + Environment.NewLine); 71await context.Response.WriteAsync(Environment.NewLine); 73await context.Response.WriteAsync("Environment Variables:" + Environment.NewLine); 74var vars = Environment.GetEnvironmentVariables(); 78await context.Response.WriteAsync(key + ": " + value + Environment.NewLine); 81await context.Response.WriteAsync(Environment.NewLine);
illink (1)
ILLink.Tasks (1)
LinkTask.cs (1)
246_dotnetPath = Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName);
Infrastructure.Common (14)
CertificateManager.cs (4)
73return Path.Combine(Environment.CurrentDirectory, "wcfLocal.keychain"); 118exceptionString.AppendFormat("while attempting to install cert with thumbprint '{1}'.", Environment.NewLine, certificate.Thumbprint); 119exceptionString.AppendFormat("{0}This is usually due to permissions issues if writing to the LocalMachine location", Environment.NewLine); 120exceptionString.AppendFormat("{0}Try running the test with elevated or superuser permissions.", Environment.NewLine);
ConditionalTestDetectors.cs (4)
122string computerName = Environment.GetEnvironmentVariable("COMPUTERNAME"); 123string logonServer = Environment.GetEnvironmentVariable("LOGONSERVER"); 124string userDomain = Environment.GetEnvironmentVariable("USERDOMAIN"); 238result = Environment.GetEnvironmentVariable("USERDOMAIN");
ConditionalWcfTest.cs (1)
43string value = Environment.GetEnvironmentVariable(conditionName);
ServiceUtilHelper.cs (3)
120Environment.NewLine, rootCertificate)); 209Environment.NewLine, clientCertificate)); 322Environment.NewLine, peerCertificate));
TestProperties.cs (1)
56? Environment.GetEnvironmentVariable(propertyName)
xunit\WcfTestCase.cs (1)
56timer = new Timer((s) => Environment.FailFast($"Test timed out after duration {_failFastDuration}"),
Infrastructure.IntegrationTests (2)
OSAndFrameworkTests.4.1.1.cs (2)
27Environment.NewLine, 29Environment.NewLine,
InMemory.FunctionalTests (10)
HttpsTests.cs (2)
193userMessage: string.Join(Environment.NewLine, loggerProvider.ErrorLogger.ErrorMessages)); 222userMessage: string.Join(Environment.NewLine, loggerProvider.ErrorLogger.ErrorMessages));
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
15Environment.GetEnvironmentVariable("TRACE_REVOCATION_RESPONSE") != null;
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (7)
119throw new TimeoutException($"Did not receive a complete response within {Timeout}.{Environment.NewLine}{Environment.NewLine}" + 120$"Expected:{Environment.NewLine}{expected}{Environment.NewLine}{Environment.NewLine}" + 121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}",
InProcessWebSite (24)
Startup.cs (24)
39if (Environment.GetEnvironmentVariable("ENABLE_HTTPS_REDIRECTION") != null) 67private async Task CurrentDirectory(HttpContext ctx) => await ctx.Response.WriteAsync(Environment.CurrentDirectory); 75await ctx.Response.WriteAsync("IIS Version: " + config["IIS_VERSION"] + Environment.NewLine); 76await ctx.Response.WriteAsync("ApplicationId: " + config["IIS_APPLICATION_ID"] + Environment.NewLine); 77await ctx.Response.WriteAsync("Application Path: " + config["IIS_PHYSICAL_PATH"] + Environment.NewLine); 78await ctx.Response.WriteAsync("Application Virtual Path: " + config["IIS_APPLICATION_VIRTUAL_PATH"] + Environment.NewLine); 79await ctx.Response.WriteAsync("Application Config Path: " + config["IIS_APP_CONFIG_PATH"] + Environment.NewLine); 80await ctx.Response.WriteAsync("AppPool ID: " + config["IIS_APP_POOL_ID"] + Environment.NewLine); 81await ctx.Response.WriteAsync("AppPool Config File: " + config["IIS_APP_POOL_CONFIG_FILE"] + Environment.NewLine); 82await ctx.Response.WriteAsync("Site ID: " + config["IIS_SITE_ID"] + Environment.NewLine); 91await ctx.Response.WriteAsync("IIS Version: " + envFeature.IISVersion + Environment.NewLine); 92await ctx.Response.WriteAsync("ApplicationId: " + envFeature.ApplicationId + Environment.NewLine); 93await ctx.Response.WriteAsync("Application Path: " + envFeature.ApplicationPhysicalPath + Environment.NewLine); 94await ctx.Response.WriteAsync("Application Virtual Path: " + envFeature.ApplicationVirtualPath + Environment.NewLine); 95await ctx.Response.WriteAsync("Application Config Path: " + envFeature.AppConfigPath + Environment.NewLine); 96await ctx.Response.WriteAsync("AppPool ID: " + envFeature.AppPoolId + Environment.NewLine); 97await ctx.Response.WriteAsync("AppPool Config File: " + envFeature.AppPoolConfigFile + Environment.NewLine); 98await ctx.Response.WriteAsync("Site ID: " + envFeature.SiteId + Environment.NewLine); 103private async Task ASPNETCORE_IIS_PHYSICAL_PATH(HttpContext ctx) => await ctx.Response.WriteAsync(Environment.GetEnvironmentVariable("ASPNETCORE_IIS_PHYSICAL_PATH")); 218await ctx.Response.WriteAsync(Environment.GetEnvironmentVariable(ctx.Request.Query["name"].ToString())); 675await ctx.Response.WriteAsync(line + Environment.NewLine); 707await ctx.Response.WriteAsync(line + Environment.NewLine); 1064await ctx.Response.WriteAsync(string.Join("|", Environment.GetCommandLineArgs().Skip(1))); 1128await context.Response.WriteAsync(Environment.ProcessId.ToString(CultureInfo.InvariantCulture));
installer.tasks (16)
GenerateFileVersionProps.cs (1)
117string.Concat(versionlessFiles.Select(f => Environment.NewLine + f)));
GenerateRunScript.cs (2)
43Log.LogMessage($"Run commands = {string.Join(Environment.NewLine, RunCommands)}"); 65string[] newlineSeparator = new string[] { Environment.NewLine };
StaticFileRegeneration\TpnDocument.cs (6)
31Environment.NewLine, 53Environment.NewLine, 65Preamble + Environment.NewLine + 66string.Join(Environment.NewLine + Environment.NewLine, Sections) + 67Environment.NewLine;
StaticFileRegeneration\TpnSection.cs (2)
23Header + Environment.NewLine + Environment.NewLine + Content;
StaticFileRegeneration\TpnSectionHeader.cs (5)
75SeparatorLine + Environment.NewLine + 76Environment.NewLine + 81Name + Environment.NewLine + 100string name = string.Join(Environment.NewLine, nameLines); 143Name = string.Join(Environment.NewLine, nameLines),
InteractiveHost.UnitTests (2)
AbstractInteractiveHostTests.cs (2)
45if (Environment.GetEnvironmentVariable("DOTNET_ROOT") == null) 58Environment.SetEnvironmentVariable("DOTNET_ROOT", dir);
Interop.FunctionalTests (6)
H2SpecCommands.cs (2)
54var root = Path.Combine(Environment.CurrentDirectory, "h2spec"); 291throw new Exception(string.Join(Environment.NewLine, failures));
Http3\Http3RequestTests.cs (2)
1212Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception); 1298Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception);
Http3\Http3TlsTests.cs (2)
517var appData = Environment.GetEnvironmentVariable("APPDATA"); 518var home = Environment.GetEnvironmentVariable("HOME");
InteropClient (2)
InteropClient.cs (2)
120.WithNotParsed(errors => Environment.Exit(1)) 857string keyFile = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS")!;
InteropTests (4)
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Kestrel.SampleApp (3)
Startup.cs (3)
55+ $"{Environment.NewLine}" 57+ $"{Environment.NewLine}" 60var response = $"hello, world{Environment.NewLine}";
Metrics (26)
Program.cs (2)
246await metricFile.WriteStringAsync(Environment.NewLine + Environment.NewLine).ConfigureAwait(false);
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Metrics.Legacy (26)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Tools\Metrics\Program.cs (2)
246await metricFile.WriteStringAsync(Environment.NewLine + Environment.NewLine).ConfigureAwait(false);
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.Arcade.Common (8)
CommandFactory.cs (2)
39var comSpec = System.Environment.GetEnvironmentVariable("ComSpec"); 73foreach (var path in System.Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator))
CommandResult.cs (4)
37message.AppendLine($"{Environment.NewLine}Standard Output:{Environment.NewLine}{StdOut}"); 42message.AppendLine($"{Environment.NewLine}Standard Error:{Environment.NewLine}{StdErr}");
CompactConsoleLoggerFormatter.cs (2)
47_newLineWithMessagePadding = Environment.NewLine + _messagePadding; 101textWriter.WriteLine(message.Replace(Environment.NewLine, _newLineWithMessagePadding));
Microsoft.Arcade.Test.Common (1)
AssertEx.cs (1)
497itemSeparator: Environment.NewLine);
Microsoft.AspNetCore (2)
WebApplicationBuilder.cs (2)
258string cwd = System.Environment.CurrentDirectory; 259if (!OperatingSystem.IsWindows() || !string.Equals(cwd, System.Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Analyzer.Testing (4)
CodeFixRunner.cs (2)
55Environment.NewLine, 57throw new InvalidOperationException($"Compilation failed:{Environment.NewLine}{message}");
DiagnosticVerifier.cs (1)
178_testOutputHelper?.WriteLine("Adding file: " + newFileName + Environment.NewLine + source);
TestSource.cs (1)
52testInput.Source = string.Join(Environment.NewLine, lines);
Microsoft.AspNetCore.App.Analyzers.Test (6)
Authorization\AddAuthorizationBuilderTests.cs (3)
730var fullSource = string.Join(Environment.NewLine, source, _testAuthorizationPolicyClassDeclaration); 731var fullFixedSource = string.Join(Environment.NewLine, fixedSource, _testAuthorizationPolicyClassDeclaration); 738var fullSource = string.Join(Environment.NewLine, source, _testAuthorizationPolicyClassDeclaration);
RouteEmbeddedLanguage\RoutePatternParserTests.cs (2)
186$"Parsing '{token.ValueText}' throws RoutePattern error '{ex.Message}'. Error not found in diagnostics: " + Environment.NewLine + 187string.Join(Environment.NewLine, tree.Diagnostics.Select(d => d.Message)));
Verifiers\CSharpAnalyzerVerifier.cs (1)
53Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"),
Microsoft.AspNetCore.App.CodeFixes (1)
Authorization\AddAuthorizationBuilderFixer.cs (1)
122SyntaxFactory.EndOfLine(Environment.NewLine),
Microsoft.AspNetCore.App.UnitTests (6)
PackageTests.cs (2)
36Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), 40Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") :
SharedFxTests.cs (2)
28Environment.GetEnvironmentVariable("DOTNET_ROOT"), 325Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") :
TargetingPackTests.cs (2)
29Environment.GetEnvironmentVariable("DOTNET_ROOT"), 383Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") :
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (9)
UserJwtsTests.cs (9)
99Assert.Equal($"Hello {Environment.UserName}!", await client.GetStringAsync("/secret")); 328Assert.Contains($"Name: {Environment.UserName}", output); 342Assert.Contains($"Name: {Environment.UserName}", output); 357Assert.Contains($"Name: {Environment.UserName}", output); 389Assert.Contains($"Name: {Environment.UserName}", output); 409Assert.Equal(Environment.UserName, deserialized.Name); 428Assert.Contains($"Name: {Environment.UserName}", output); 449Assert.Contains($"Name: {Environment.UserName}", output); 469Assert.Equal(Environment.UserName, deserialized.Name);
Microsoft.AspNetCore.Authentication.Test (1)
TwitterTests.cs (1)
307var expectedErrorMessage = "An error has occurred while calling the Twitter API, error's returned:" + Environment.NewLine
Microsoft.AspNetCore.Authentication.Twitter (1)
TwitterHandler.cs (1)
393errorMessageStringBuilder.Append(Environment.NewLine);
Microsoft.AspNetCore.Authorization (2)
LoggingExtensions.cs (2)
21: "These requirements were not met:" + Environment.NewLine + string.Join(Environment.NewLine, failure.FailedRequirements);
Microsoft.AspNetCore.Authorization.Test (2)
DefaultAuthorizationServiceTests.cs (2)
1195Assert.Equal("Authorization failed. These requirements were not met:" + Environment.NewLine + "LogRequirement" + Environment.NewLine + "LogRequirement", message);
Microsoft.AspNetCore.BrowserTesting (8)
BrowserTestBase.cs (3)
21!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("ContinuousIntegrationBuild")) || 22!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("Helix")); 40var os = Environment.OSVersion.Platform switch
ContextInformation.cs (1)
54var uploadDir = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
PageInformation.cs (4)
93var messageText = message.Text.Replace(Environment.NewLine, $"{Environment.NewLine} "); 96var logMessage = $"[{_page.Url}]{Environment.NewLine} {messageText}{Environment.NewLine} ({location})";
Microsoft.AspNetCore.Components (4)
Reflection\ComponentProperties.cs (4)
242$"when also used to capture unmatched values. Unmatched values:" + Environment.NewLine + 243string.Join(Environment.NewLine, unmatched.Keys)); 263$"per type can use '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. Properties:" + Environment.NewLine + 264string.Join(Environment.NewLine, propertyNames));
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentParameterAnalyzer.cs (2)
130Environment.NewLine, 132Environment.NewLine,
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
ComponentParameterCaptureUnmatchedValuesMustBeUniqueTest.cs (2)
45var message = @"Component type 'ConsoleApplication1.TypeName' defines properties multiple parameters with CaptureUnmatchedValues. Properties: " + Environment.NewLine + 46"ConsoleApplication1.TypeName.MyOtherProperty" + Environment.NewLine +
Microsoft.AspNetCore.Components.Endpoints (1)
DependencyInjection\WebAssemblySettingsEmitter.cs (1)
22=> Environment.GetEnvironmentVariable(name) is { Length: > 0 } value ? value : null;
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentParameterAnalyzer.cs (2)
117Environment.NewLine, 119Environment.NewLine,
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
ComponentParameterCaptureUnmatchedValuesMustBeUniqueTest.cs (2)
45var message = @"Component type 'ConsoleApplication1.TypeName' defines properties multiple parameters with CaptureUnmatchedValues. Properties: " + Environment.NewLine + 46"ConsoleApplication1.TypeName.MyOtherProperty" + Environment.NewLine +
Microsoft.AspNetCore.Components.Server (1)
src\submodules\MessagePack-CSharp\src\MessagePack.UnityClient\Assets\Scripts\MessagePack\SequencePool.cs (1)
55: this(Environment.ProcessorCount * 2, ArrayPool<byte>.Create(80 * 1024, 100))
Microsoft.AspNetCore.Components.Server.Tests (4)
src\SignalR\common\SignalR.Common\test\Internal\Protocol\MessagePackHubProtocolTestBase.cs (4)
280Assert.True(string.Equals(actual, testData.Binary, StringComparison.Ordinal), $"Binary encoding changed from{Environment.NewLine} [{testData.Binary}]{Environment.NewLine} to{Environment.NewLine} [{actual}]{Environment.NewLine}Please verify the MsgPack output and update the baseline");
Microsoft.AspNetCore.Components.Tests (6)
ParameterViewTest.Assignment.cs (6)
386$"also used to capture unmatched values. Unmatched values:" + Environment.NewLine + 387$"test1" + Environment.NewLine + 410$"also used to capture unmatched values. Unmatched values:" + Environment.NewLine + 411$"test2" + Environment.NewLine + 431$"Properties:" + Environment.NewLine + 432$"{nameof(HasDuplicateCaptureUnmatchedValuesProperty.CaptureUnmatchedValuesProp1)}" + Environment.NewLine +
Microsoft.AspNetCore.Components.WebAssembly (5)
Hosting\WebAssemblyCultureProvider.cs (1)
46if (Environment.GetEnvironmentVariable("__BLAZOR_SHARDED_ICU") == "1" &&
Hosting\WebAssemblyHost.cs (1)
152if (Environment.GetEnvironmentVariable("__BLAZOR_WEBASSEMBLY_WAIT_FOR_ROOT_COMPONENTS") == "true")
Rendering\WebAssemblyDispatcher.cs (1)
16public override bool CheckAccess() => _mainManagedThreadId == Environment.CurrentManagedThreadId;
Services\WebAssemblyConsoleLogger.cs (2)
17private static readonly string _newLineWithMessagePadding = Environment.NewLine + _messagePadding; 124logBuilder.Replace(Environment.NewLine, _newLineWithMessagePadding, len, message.Length);
Microsoft.AspNetCore.Components.WebAssembly.Server (4)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
26=> Environment.GetEnvironmentVariable(name) is { Length: > 0 } value ? value : null;
DebugProxyLauncher.cs (2)
43var noProxyEnvVar = Environment.GetEnvironmentVariable("NO_PROXY"); 63var ownerPid = Environment.ProcessId;
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
Microsoft.AspNetCore.Components.WebAssembly.Tests (2)
Hosting\WebAssemblyCultureProviderTest.cs (2)
46Environment.SetEnvironmentVariable("__BLAZOR_SHARDED_ICU", "1"); 62Environment.SetEnvironmentVariable("__BLAZOR_SHARDED_ICU", null);
Microsoft.AspNetCore.Components.WebView.WindowsForms (3)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (3)
393 string.Join(Environment.NewLine, headers.Select(kvp => $"{kvp.Key}: {kvp.Value}")); 416 Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
Microsoft.AspNetCore.Components.WebView.Wpf (3)
src\BlazorWebView\src\SharedSource\WebView2WebViewManager.cs (3)
393 string.Join(Environment.NewLine, headers.Select(kvp => $"{kvp.Key}: {kvp.Value}")); 416 Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
Microsoft.AspNetCore.Components.WebViewE2E.Test (6)
BasicBlazorHybridTest.cs (6)
21Console.WriteLine($"Current directory: {Environment.CurrentDirectory}"); 28Environment.SetEnvironmentVariable("PATH", newNativePath + ";" + Environment.GetEnvironmentVariable("PATH")); 29Console.WriteLine($"New PATH env var: {Environment.GetEnvironmentVariable("PATH")}"); 64"Fatal exception" + Environment.NewLine + 65error.ExceptionObject.ToString() + Environment.NewLine);
Microsoft.AspNetCore.Cryptography.Internal (1)
Cng\OSVersionUtil.cs (1)
15if (Environment.OSVersion.Platform is not PlatformID.Win32NT)
Microsoft.AspNetCore.DataProtection (8)
Internal\ContainerUtils.cs (1)
111var value = Environment.GetEnvironmentVariable(envVarName);
Repositories\DefaultKeyStorageDirectories.cs (7)
37var localAppDataFromSystemPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 38var localAppDataFromEnvPath = Environment.GetEnvironmentVariable("LOCALAPPDATA"); 39var homePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 93if (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("WEBSITE_INSTANCE_ID"))) 95var homeEnvVar = Environment.GetEnvironmentVariable("HOME");
Microsoft.AspNetCore.DataProtection.Tests (10)
Repositories\FileSystemXmlRepositoryTests.cs (3)
19? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ASP.NET") 20: Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".aspnet");
StringLoggerFactory.cs (4)
64"Provider: {0}" + Environment.NewLine + 65"Log level: {1}" + Environment.NewLine + 66"Event id: {2}" + Environment.NewLine + 67"Exception: {3}" + Environment.NewLine +
XmlAssert.cs (3)
37"Expected element:" + Environment.NewLine 38+ expected.ToString() + Environment.NewLine 39+ "Actual element:" + Environment.NewLine
Microsoft.AspNetCore.DeveloperCertificates.XPlat (17)
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (1)
306.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
src\Shared\Diagnostics\BaseView.cs (1)
293return string.Join("<br />" + Environment.NewLine,
src\Shared\RazorViews\BaseView.cs (1)
283return string.Join("<br />" + Environment.NewLine,
Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore (2)
src\Shared\Diagnostics\BaseView.cs (1)
293return string.Join("<br />" + Environment.NewLine,
src\Shared\RazorViews\BaseView.cs (1)
283return string.Join("<br />" + Environment.NewLine,
Microsoft.AspNetCore.FunctionalTests (2)
WebApplicationFunctionalTests.cs (2)
156var timeoutTicks = Environment.TickCount64 + InternalTesting.TaskExtensions.DefaultTimeoutDuration; 159while (!logWritten && Environment.TickCount < timeoutTicks)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
src\Grpc\JsonTranscoding\src\Shared\X509CertificateHelpers.cs (1)
117Environment.NewLine,
Microsoft.AspNetCore.Hosting (8)
Internal\HostingLoggerExtensions.cs (1)
35message = message + Environment.NewLine + ex.Message;
src\Shared\RazorViews\BaseView.cs (1)
283return string.Join("<br />" + Environment.NewLine,
WebHostBuilder.cs (6)
50UseSetting(WebHostDefaults.EnvironmentKey, Environment.GetEnvironmentVariable("Hosting:Environment") 51?? Environment.GetEnvironmentVariable("ASPNET_ENV")); 57UseSetting(WebHostDefaults.ServerUrlsKey, Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS")); 146if (Environment.GetEnvironmentVariable("Hosting:Environment") != null) 151if (Environment.GetEnvironmentVariable("ASPNET_ENV") != null) 156if (Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS") != null)
Microsoft.AspNetCore.Hosting.Tests (4)
GenericWebHostBuilderTests.cs (4)
23Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 29Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, null); 36Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 42Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, null);
Microsoft.AspNetCore.Html.Abstractions (6)
HtmlContentBuilderExtensions.cs (4)
70/// Appends an <see cref="Environment.NewLine"/>. 83/// Appends an <see cref="Environment.NewLine"/> after appending the <see cref="string"/> value. 99/// Appends an <see cref="Environment.NewLine"/> after appending the <see cref="IHtmlContent"/> value. 114/// Appends an <see cref="Environment.NewLine"/> after appending the <see cref="string"/> value.
HtmlString.cs (2)
14/// An <see cref="HtmlString"/> instance for <see cref="Environment.NewLine"/>. 16public static readonly HtmlString NewLine = new HtmlString(Environment.NewLine);
Microsoft.AspNetCore.Html.Abstractions.Tests (4)
HtmlContentBuilderExtensionsTest.cs (4)
25entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 41entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 58entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry))); 74entry => Assert.Equal(Environment.NewLine, HtmlContentToString(entry)));
Microsoft.AspNetCore.Http (1)
src\Http\WebUtilities\src\AspNetCoreTempDirectory.cs (1)
19var temp = Environment.GetEnvironmentVariable("ASPNETCORE_TEMP") ?? // ASPNETCORE_TEMP - User set temporary location.
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionContext.cs (3)
77LastSeenTicks = TimeSpan.FromMilliseconds(Environment.TickCount64); 621LastSeenTicks = TimeSpan.FromMilliseconds(Environment.TickCount64); 653_startedSendTime = TimeSpan.FromMilliseconds(Environment.TickCount64);
Internal\HttpConnectionManager.cs (1)
144var ticks = TimeSpan.FromMilliseconds(Environment.TickCount64);
Microsoft.AspNetCore.Http.Connections.Tests (7)
HttpConnectionDispatcherTests.cs (7)
558connection.LastSeenTicks = TimeSpan.FromMilliseconds(Environment.TickCount64) - disconnectTimeout - TimeSpan.FromTicks(1); 1280var initialTime = TimeSpan.FromMilliseconds(Environment.TickCount64); 1305connection.TryCancelSend(TimeSpan.FromMilliseconds(Environment.TickCount64) + options.TransportSendTimeout + TimeSpan.FromTicks(1)); 1321var initialTime = TimeSpan.FromMilliseconds(Environment.TickCount64); 1344connection.TryCancelSend(TimeSpan.FromMilliseconds(Environment.TickCount64) + options.TransportSendTimeout + TimeSpan.FromTicks(1)); 1365var initialTime = TimeSpan.FromMilliseconds(Environment.TickCount64); 1388connection.TryCancelSend(TimeSpan.FromMilliseconds(Environment.TickCount64) + options.TransportSendTimeout + TimeSpan.FromTicks(1));
Microsoft.AspNetCore.Http.Microbenchmarks (3)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
357? Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "RequestDelegateGenerator", "Baselines") 368newSource += Environment.NewLine; 377.Split(Environment.NewLine);
Microsoft.AspNetCore.HttpLogging (3)
HttpLog.cs (2)
45builder.Append(Environment.NewLine); 53builder.Append(Environment.NewLine);
W3CLoggingMiddleware.cs (1)
94_serverName ??= Environment.MachineName;
Microsoft.AspNetCore.HttpLogging.Tests (17)
FileLoggerProcessorTests.cs (13)
22TempPath = Path.Combine(Environment.CurrentDirectory, "_"); 53Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath)); 99Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePathToday)); 101Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePathTomorrow)); 140Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 141Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2)); 404Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 405Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2)); 406Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3)); 471Assert.Equal(_messageThree + Environment.NewLine, File.ReadAllText(filePath3)); 472Assert.Equal(_messageFour + Environment.NewLine, File.ReadAllText(filePath4)); 539Assert.Equal(_messageOne + Environment.NewLine, File.ReadAllText(filePath1)); 540Assert.Equal(_messageTwo + Environment.NewLine, File.ReadAllText(filePath2));
HttpLoggingMiddlewareTests.cs (4)
1346var lines = requestLog.Message.Split(Environment.NewLine); 1594var lines = Assert.Single(TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Information)).Message.Split(Environment.NewLine); 1656var lines = Assert.Single(TestSink.Writes).Message.Split(Environment.NewLine); 1723var lines = Assert.Single(TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Information)).Message.Split(Environment.NewLine);
Microsoft.AspNetCore.Identity.UI (4)
Areas_Identity_Pages_V4__Layout_cshtml.g.cs (2)
295$"we have looked at it in the following locations: {System.Environment.NewLine}{string.Join(System.Environment.NewLine, result.SearchedLocations)}.");
Areas_Identity_Pages_V5__Layout_cshtml.g.cs (2)
298$"we have looked at it in the following locations: {System.Environment.NewLine}{string.Join(System.Environment.NewLine, result.SearchedLocations)}.");
Microsoft.AspNetCore.InternalTesting (14)
AssemblyTestLog.cs (2)
41var maxPathString = Environment.GetEnvironmentVariable(MaxPathLengthEnvironmentVariableName); 226var stackTrace = Environment.StackTrace;
CultureReplacer.cs (2)
34_threadId = Environment.CurrentManagedThreadId; 73Assert.True(Environment.CurrentManagedThreadId == _threadId,
HelixHelper.cs (2)
13public static string GetTargetHelixQueue() => Environment.GetEnvironmentVariable("helix"); 18var uploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
Logging\XunitLoggerProvider.cs (3)
47private static readonly string[] NewLineChars = new[] { Environment.NewLine }; 98if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 100message = message.Substring(0, message.Length - Environment.NewLine.Length);
xunit\AspNetTestRunner.cs (1)
102return new(totalTimeTaken, string.Join(Environment.NewLine, messages));
xunit\EnvironmentVariableSkipConditionAttribute.cs (1)
83return Environment.GetEnvironmentVariable(name);
xunit\MaximumOSVersionAttribute.cs (1)
74return Environment.OSVersion.Version;
xunit\MinimumOsVersionAttribute.cs (1)
70return Environment.OSVersion.Version;
xunit\SkipOnCIAttribute.cs (1)
41public static string GetIfOnAzdo() => Environment.GetEnvironmentVariable("AGENT_OS");
Microsoft.AspNetCore.InternalTesting.Tests (23)
AssemblyTestLogTests.cs (2)
392return string.Join(Environment.NewLine, input.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
MaximumOSVersionTest.cs (4)
21Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 32Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 72Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 86Assert.True(Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal),
MinimumOSVersionTest.cs (3)
20Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 31Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal), 70Environment.OSVersion.Version.ToString().StartsWith("6.1", StringComparison.Ordinal),
QuarantinedTestAttributeTest.cs (2)
16if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AGENT_OS")))
SkipOnCITests.cs (2)
16if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX")) || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AGENT_OS")))
XunitLoggerProviderTest.cs (10)
27"| [TIMESTAMP] TestCategory Information: This is some great information" + Environment.NewLine + 28"| [TIMESTAMP] TestCategory Trace: This is some unimportant information" + Environment.NewLine; 44Assert.Equal("| [TIMESTAMP] TestCategory Error: This is a bad error" + Environment.NewLine, MakeConsistent(testTestOutputHelper.Output)); 55logger.LogInformation("This is a" + Environment.NewLine + "multi-line" + Environment.NewLine + "message"); 59"| [TIMESTAMP] TestCategory Information: This is a" + Environment.NewLine + 60"| multi-line" + Environment.NewLine + 61"| message" + Environment.NewLine; 77logger.LogInformation("This is a" + Environment.NewLine + "multi-line" + Environment.NewLine + "message");
Microsoft.AspNetCore.Mvc.Core (20)
ApiConventionTypeAttribute.cs (3)
75Environment.NewLine + string.Join(Environment.NewLine, unsupportedAttributes) + Environment.NewLine,
ApplicationModels\ApplicationModelFactory.cs (9)
166Environment.NewLine, 213Environment.NewLine, 245var message = Resources.FormatAttributeRoute_DuplicateNames(routeName, Environment.NewLine, string.Join(Environment.NewLine, descriptions)); 333Environment.NewLine, 334string.Join(Environment.NewLine, actionDescriptions)); 342Environment.NewLine, 343string.Join(Environment.NewLine + Environment.NewLine, errorMessages));
ApplicationModels\InferParameterBindingInfoConvention.cs (2)
95var parameters = string.Join(Environment.NewLine, fromBodyParameters.Select(p => p.DisplayName)); 102message += Environment.NewLine + parameters;
Infrastructure\ActionSelector.cs (2)
99Environment.NewLine, 104Environment.NewLine,
Routing\AttributeRoute.cs (4)
164Environment.NewLine + Environment.NewLine, 168Environment.NewLine, 171var message = Resources.FormatAttributeRoute_AggregateErrorMessage(Environment.NewLine, allErrors);
Microsoft.AspNetCore.Mvc.Core.Test (59)
ApiConventionMethodAttributeTest.cs (3)
147Environment.NewLine + 148string.Join(Environment.NewLine, attributes.Select(a => a.FullName)) + 149Environment.NewLine +
ApiConventionTypeAttributeTest.cs (3)
82Environment.NewLine + 83string.Join(Environment.NewLine, attributes.Select(a => a.ToString())) + 84Environment.NewLine +
ApplicationModels\ControllerActionDescriptorProviderTests.cs (28)
424"The following errors occurred with attribute routing information:" + Environment.NewLine + 425Environment.NewLine + 426"Error 1:" + Environment.NewLine + 427$"For action: '{controllerTypeInfo.FullName}.Unknown ({assemblyName})'" + Environment.NewLine + 430" a route or within a constraint, use '[[' or ']]' instead." + Environment.NewLine + 431Environment.NewLine + 432"Error 2:" + Environment.NewLine + 433$"For action: '{controllerTypeInfo.FullName}.Invalid ({assemblyName})'" + Environment.NewLine + 664"The following errors occurred with attribute routing information:" + Environment.NewLine + 665Environment.NewLine + 666"Error 1:" + Environment.NewLine + 668" must not define attribute routed actions and non attribute routed actions at the same time:" + Environment.NewLine + 671"HTTP Verbs: 'GET'" + Environment.NewLine + 673"Route Template: '(none)' - HTTP Verbs: 'DELETE, PATCH, POST, PUT'" + Environment.NewLine + 674Environment.NewLine + 706+ Environment.NewLine 707+ Environment.NewLine 709+ Environment.NewLine 712+ Environment.NewLine + 716+ Environment.NewLine 719"HTTP Verbs: ''" + Environment.NewLine + 720Environment.NewLine + 873"The following errors occurred with attribute routing information:" + Environment.NewLine + 874Environment.NewLine + 875"Error 1:" + Environment.NewLine + 876$"For action: '{controllerTypeInfo.FullName}.Get ({assemblyName})'" + Environment.NewLine + 1402.Split(new[] { Environment.NewLine }, StringSplitOptions.None) 1406.Split(new[] { Environment.NewLine }, StringSplitOptions.None)
ApplicationModels\InferParameterBindingInfoConventionTest.cs (6)
60Environment.NewLine + "TestModel a" + 61Environment.NewLine + "Car b"; 79Environment.NewLine + "TestModel a" + 80Environment.NewLine + "int b"; 98Environment.NewLine + "decimal a" + 99Environment.NewLine + "int b";
Infrastructure\ActionSelectorTest.cs (4)
506var actionNames = string.Join(Environment.NewLine, actions.Select(action => action.DisplayName)); 817"The following actions matched route data and had all constraints satisfied:" + Environment.NewLine + 818Environment.NewLine + 819"Ambiguous1" + Environment.NewLine +
Routing\AttributeRoutingTest.cs (15)
29"The following errors occurred with attribute routing information:" + Environment.NewLine + 30Environment.NewLine + 31"For action: 'InvalidTemplate'" + Environment.NewLine + 56"The following errors occurred with attribute routing information:" + Environment.NewLine + 57Environment.NewLine + 58"For action: 'DisallowedParameter'" + Environment.NewLine + 86"The following errors occurred with attribute routing information:" + Environment.NewLine + 87Environment.NewLine + 88"For action: 'DisallowedParameter1'" + Environment.NewLine + 90"Use '[foo]' in the route template to insert the value 'bleh'." + Environment.NewLine + 91Environment.NewLine + 92"For action: 'DisallowedParameter2'" + Environment.NewLine + 128"The following errors occurred with attribute routing information:" + Environment.NewLine + 129Environment.NewLine + 130"For action: 'Microsoft.AspNetCore.Mvc.Routing.AttributeRoutingTest+HomeController.Index'" + Environment.NewLine +
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (4)
XmlDataContractSerializerInputFormatterTest.cs (1)
534var inputStart = Encoding.UTF8.GetBytes("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + Environment.NewLine +
XmlDataContractSerializerOutputFormatterTest.cs (1)
690var newLine = Environment.NewLine;
XmlSerializerInputFormatterTest.cs (1)
554var inputStart = Encoding.UTF8.GetBytes("<?xml version=\"1.0\" encoding=\"UTF-8\"?>" + Environment.NewLine +
XmlSerializerOutputFormatterTest.cs (1)
74var newLine = Environment.NewLine;
Microsoft.AspNetCore.Mvc.FunctionalTests (27)
ContentNegotiationTest.cs (3)
59var expectedBody = $"{{{Environment.NewLine} \"name\": \"My name\",{Environment.NewLine}" + 60$" \"address\": \"My address\"{Environment.NewLine}}}";
HtmlGenerationTest.cs (10)
94Assert.Equal($"Vrijdag{Environment.NewLine}Month: FirstOne", response, ignoreLineEndingDifferences: true); 649"<label class=\"control-label col-md-2\" for=\"Name\">ItemName</label>" + Environment.NewLine + 650"<input id=\"Name\" name=\"Name\" type=\"text\" value=\"\" />" + Environment.NewLine + Environment.NewLine + 651"<label class=\"control-label col-md-2\" for=\"Id\">ItemNo</label>" + Environment.NewLine + 653Environment.NewLine + Environment.NewLine; 666var expected = "<label for=\"Description\">ItemDesc</label>" + Environment.NewLine + 667"<input id=\"Description\" name=\"Description\" type=\"text\" value=\"\" />" + Environment.NewLine + Environment.NewLine;
HtmlGenerationWithCultureTest.cs (2)
179throw new XunitException($"Unexpected correlation Id, reading values from document:{Environment.NewLine}{documentContent}"); 197throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Infrastructure\HttpClientExtensions.cs (3)
29throw new InvalidOperationException("Response content could not be parsed as HTML: " + Environment.NewLine + content); 42string responseContent = string.Join(Environment.NewLine, response.Headers); 52throw EqualException.ForMismatchedValues(expectedStatusCode, response.StatusCode, $"Expected status code {expectedStatusCode}. Actual {response.StatusCode}. Response Content:" + Environment.NewLine + responseContent);
Infrastructure\IHtmlDocumentExtensions.cs (1)
16throw new ArgumentException($"Document does not contain element that matches the selector {selector}: " + Environment.NewLine + document.DocumentElement.OuterHtml);
Infrastructure\ResourceFile.cs (2)
133/// <remarks>Normalizes line endings to <see cref="Environment.NewLine"/>.</remarks> 173/// <remarks>Normalizes line endings to <see cref="Environment.NewLine"/>.</remarks>
RazorBuildTest.cs (1)
158await UpdateFile("/Pages/UpdateablePage.cshtml", "@page" + Environment.NewLine + "@GetType().Assembly");
RazorRuntimeCompilationHostingStartupTest.cs (1)
104await UpdateFile("/Pages/UpdateablePage.cshtml", "@page" + Environment.NewLine + "@GetType().Assembly");
SimpleTests.cs (3)
33var expected = "{" + Environment.NewLine 34+ " \"first\": \"wall\"," + Environment.NewLine 35+ " \"second\": \"floor\"" + Environment.NewLine
TempDataInCookiesTest.cs (1)
50throw new Exception($"Expected exactly one instance of TempDataSerializer based on NewtonsoftJson, but found {tempDataSerializers.Count} instance(s):" + Environment.NewLine + builder);
Microsoft.AspNetCore.Mvc.Razor (6)
ApplicationParts\RazorCompiledItemFeatureProvider.cs (2)
28var viewsDifferingInCase = string.Join(Environment.NewLine, duplicates.Select(d => d.Identifier)); 31Environment.NewLine,
RazorView.cs (4)
285locations = Environment.NewLine + string.Join(Environment.NewLine, originalLocations); 291Environment.NewLine + string.Join(Environment.NewLine, layoutPageResult.SearchedLocations);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CompilationFailedException.cs (2)
24return Resources.CompilationFailed + Environment.NewLine + 26Environment.NewLine,
Microsoft.AspNetCore.Mvc.Razor.Test (53)
ApplicationParts\RazorCompiledItemFeatureProviderTest.cs (1)
94Environment.NewLine,
RazorPageTest.cs (3)
785var expected = string.Join(Environment.NewLine, 795v.WriteLiteral("Layout start" + Environment.NewLine); 803page.BodyContent = new HtmlString("body content" + Environment.NewLine);
RazorViewTest.cs (49)
236Environment.NewLine, 249v.Write("layout-content" + Environment.NewLine); 518Environment.NewLine, 561Environment.NewLine, 604Environment.NewLine, 649var htmlEncodedNewLine = htmlEncoder.Encode(Environment.NewLine); 651Environment.NewLine + 675v.Write("layout-content" + Environment.NewLine); 677v.Write(Environment.NewLine); 679v.Write(Environment.NewLine); 757Environment.NewLine, 824Environment.NewLine, 907v.Write("NestedLayout" + Environment.NewLine); 920v.Write("BaseLayout" + Environment.NewLine); 974v.Write("NestedLayout" + Environment.NewLine); 988v.Write("BaseLayout" + Environment.NewLine); 1060Environment.NewLine + 1062Environment.NewLine + 1064Environment.NewLine + 1066Environment.NewLine + 1082v.Write("layout-1" + Environment.NewLine); 1093v.Write("layout-2" + Environment.NewLine); 1129"HtmlEncode[[layout-2" + Environment.NewLine + 1130"]]bar-content" + Environment.NewLine + 1131"HtmlEncode[[layout-1" + Environment.NewLine + 1132"]]foo-content" + Environment.NewLine + 1152v.Write("layout-1" + Environment.NewLine); 1165v.Write("layout-2" + Environment.NewLine); 1298Environment.NewLine + 1300Environment.NewLine + 1303Environment.NewLine + 1304Environment.NewLine; 1320v.Write("NestedLayout" + Environment.NewLine); 1332v.Write("BaseLayout" + Environment.NewLine); 1368Environment.NewLine + 1370Environment.NewLine + 1372Environment.NewLine + 1379v.WriteLiteral("body content" + Environment.NewLine); 1382v.WriteLiteral("section-content-1" + Environment.NewLine); 1391v.Write("layout-1" + Environment.NewLine); 1426Environment.NewLine + 1428Environment.NewLine + 1437v.WriteLiteral("section-content-1" + Environment.NewLine); 1446v.Write("layout-1" + Environment.NewLine); 1484v.WriteLiteral("before-flush" + Environment.NewLine); 1525v.Write("layout-1" + Environment.NewLine); 1706Environment.NewLine, 1719v.WriteLiteral("ViewStart1" + Environment.NewLine); 1723v.WriteLiteral("ViewStart2" + Environment.NewLine);
Microsoft.AspNetCore.Mvc.RazorPages (1)
Infrastructure\DefaultPageHandlerMethodSelector.cs (1)
52throw new InvalidOperationException(Resources.FormatAmbiguousHandler(Environment.NewLine, ambiguousMethods));
Microsoft.AspNetCore.Mvc.RazorPages.Test (5)
ApplicationModels\TempDataFilterPageApplicationModelProviderTest.cs (1)
50Environment.NewLine +
Infrastructure\DefaultPageHandlerMethodSelectorTest.cs (4)
664Environment.NewLine + Environment.NewLine + methods; 724Environment.NewLine + Environment.NewLine + methods;
Microsoft.AspNetCore.Mvc.TagHelpers (9)
AnchorTagHelper.cs (1)
209Environment.NewLine,
FormActionTagHelper.cs (1)
221Environment.NewLine,
FormTagHelper.cs (1)
228Environment.NewLine,
PartialTagHelper.cs (5)
128var locations = Environment.NewLine + string.Join(Environment.NewLine, viewSearchedLocations); 133locations = Environment.NewLine + string.Join(Environment.NewLine, result.SearchedLocations); 134errorMessage += Environment.NewLine + Resources.FormatViewEngine_FallbackViewNotFound(FallbackName, locations);
ScriptTagHelper.cs (1)
372builder.AppendHtml(Environment.NewLine)
Microsoft.AspNetCore.Mvc.TagHelpers.Test (85)
AnchorTagHelperTest.cs (3)
550Environment.NewLine, 588Environment.NewLine, 626Environment.NewLine,
FormActionTagHelperTest.cs (4)
573Environment.NewLine, 611Environment.NewLine, 649Environment.NewLine, 687Environment.NewLine,
FormTagHelperTest.cs (3)
1066Environment.NewLine, 1100Environment.NewLine, 1134Environment.NewLine,
LabelTagHelperTest.cs (35)
43new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "Text") }, 45new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "Text") }, 48new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "Text") }, 50new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "Text") }, 52new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "Text") }, 54new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "Text") }, 56new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "Text") }, 58new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "Text") }, 73new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "NestedModel_Text") }, 75new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "NestedModel_Text") }, 77new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "NestedModel_Text") }, 79new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "NestedModel_Text") }, 81new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "NestedModel_Text") }, 83new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "NestedModel_Text") }, 98new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "z0__Text") }, 100new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "z0__Text") }, 102new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "z0__Text") }, 104new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "z1__Text") }, 106new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "z1__Text") }, 108new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "z1__Text") }, 123new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "z0__NestedModel_Text") }, 125new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "z0__NestedModel_Text") }, 127new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "z0__NestedModel_Text") }, 129new TagHelperOutputContent(Environment.NewLine, string.Empty, "HtmlEncode[[Text]]", "z1__NestedModel_Text") }, 131new TagHelperOutputContent(Environment.NewLine, "Hello World", "Hello World", "z1__NestedModel_Text") }, 133new TagHelperOutputContent(string.Empty, Environment.NewLine, Environment.NewLine, "z1__NestedModel_Text") },
LinkTagHelperTest.cs (3)
838var expectedPostElement = Environment.NewLine + 892var expectedPostElement = Environment.NewLine + 951Environment.NewLine +
PartialTagHelperTest.cs (2)
572var expected = string.Join(Environment.NewLine, 704Environment.NewLine,
ScriptTagHelperTest.cs (3)
915Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 947Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 960Environment.NewLine +
SelectTagHelperTest.cs (17)
44var noneSelected = "<option></option>" + Environment.NewLine + 45"<option>HtmlEncode[[outer text]]</option>" + Environment.NewLine + 46"<option>HtmlEncode[[inner text]]</option>" + Environment.NewLine + 47"<option>HtmlEncode[[other text]]</option>" + Environment.NewLine; 48var innerSelected = "<option></option>" + Environment.NewLine + 49"<option>HtmlEncode[[outer text]]</option>" + Environment.NewLine + 50"<option selected=\"HtmlEncode[[selected]]\">HtmlEncode[[inner text]]</option>" + Environment.NewLine + 51"<option>HtmlEncode[[other text]]</option>" + Environment.NewLine; 52var outerSelected = "<option></option>" + Environment.NewLine + 53"<option selected=\"HtmlEncode[[selected]]\">HtmlEncode[[outer text]]</option>" + Environment.NewLine + 54"<option>HtmlEncode[[inner text]]</option>" + Environment.NewLine + 55"<option>HtmlEncode[[other text]]</option>" + Environment.NewLine; 368var expectedOptions = "<option>HtmlEncode[[0]]</option>" + Environment.NewLine 369+ "<option>HtmlEncode[[1]]</option>" + Environment.NewLine 370+ "<option>HtmlEncode[[2]]</option>" + Environment.NewLine 371+ "<option>HtmlEncode[[3]]</option>" + Environment.NewLine 372+ "<option>HtmlEncode[[4]]</option>" + Environment.NewLine;
TextAreaTagHelperTest.cs (10)
45Environment.NewLine }, 49Environment.NewLine }, 52Environment.NewLine + "HtmlEncode[[outer text]]" }, 56Environment.NewLine }, 59Environment.NewLine + "HtmlEncode[[inner text]]" }, 63Environment.NewLine }, 66Environment.NewLine + "HtmlEncode[[outer text]]" }, 70Environment.NewLine }, 73Environment.NewLine + "HtmlEncode[[inner text]]" }, 196var expectedContent = Environment.NewLine + "HtmlEncode[[model-value]]";
ValidationSummaryTagHelperTest.cs (5)
90$"Custom Content<ul><li style=\"display:none\"></li>{Environment.NewLine}</ul>", 264$"Custom Content<ul><li>{expectedError}</li>{Environment.NewLine}</ul>", 329$"Custom Content<ul><li>{expectedError0}</li>{Environment.NewLine}" + 330$"<li>{expectedError2}</li>{Environment.NewLine}</ul>", 642$"Custom Content<ul><li>{expectedError}</li>{Environment.NewLine}</ul>",
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
626string.Join(Environment.NewLine, serviceDescriptors.Select(sd => sd.ImplementationType)));
Microsoft.AspNetCore.Mvc.Testing (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-rc.1.25524.106\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
33if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds))
Microsoft.AspNetCore.Mvc.ViewFeatures (11)
Filters\SaveTempDataPropertyFilterBase.cs (1)
114throw new InvalidOperationException(string.Join(Environment.NewLine, errorMessages));
HtmlHelper.cs (4)
527locations = Environment.NewLine + string.Join(Environment.NewLine, originalLocations); 533Environment.NewLine + string.Join(Environment.NewLine, viewEngineResult.SearchedLocations);
ViewComponents\DefaultViewComponentSelector.cs (2)
100var typeNames = string.Join(Environment.NewLine, matchedTypes); 102Resources.FormatViewComponent_AmbiguousTypeMatch(name, Environment.NewLine, typeNames));
ViewEngines\ViewEngineResult.cs (4)
98locations = Environment.NewLine + string.Join(Environment.NewLine, originalLocations); 103locations += Environment.NewLine + string.Join(Environment.NewLine, SearchedLocations);
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (375)
Buffers\ViewBufferTextWriterTest.cs (4)
64var newLine = Environment.NewLine; 83var newLine = Environment.NewLine; 108var newLine = Environment.NewLine; 141var newLine = Environment.NewLine;
DefaultDisplayTemplatesTest.cs (10)
47"<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[Property1]]</div>" + Environment.NewLine 49" SimpleDisplayText = p1</div>" + Environment.NewLine 50+ "<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[Prop2]]</div>" + Environment.NewLine 52" SimpleDisplayText = (null)</div>" + Environment.NewLine; 118var expected = "<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[Property1]]</div>" + Environment.NewLine + 119"<div class=\"HtmlEncode[[display-field]]\"></div>" + Environment.NewLine + 120"<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[Property3]]</div>" + Environment.NewLine + 121"<div class=\"HtmlEncode[[display-field]]\"></div>" + Environment.NewLine; 146"<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[Prop2]]</div>" + Environment.NewLine + 148" SimpleDisplayText = (null)</div>" + Environment.NewLine;
DefaultEditorTemplatesTest.cs (20)
152"<div class=\"HtmlEncode[[editor-label]]\"><label></label></div>" + Environment.NewLine 164"<div class=\"HtmlEncode[[editor-label]]\">Some string</div>" + Environment.NewLine 168"<div class=\"HtmlEncode[[editor-label]]\">Some string</div>" + Environment.NewLine 180Environment.NewLine + 184Environment.NewLine + 186Environment.NewLine + 190Environment.NewLine; 211Environment.NewLine + 215Environment.NewLine + 217Environment.NewLine + 221Environment.NewLine; 248Environment.NewLine + 252Environment.NewLine; 343Environment.NewLine + 346Environment.NewLine + 348Environment.NewLine + 351Environment.NewLine; 377Environment.NewLine + 382Environment.NewLine; 499Environment.NewLine +
Filters\TempDataApplicationModelProviderTest.cs (1)
52Environment.NewLine +
PartialViewResultTest.cs (3)
67Environment.NewLine, 105Environment.NewLine, 143Environment.NewLine,
Rendering\HtmlHelperDisplayExtensionsTest.cs (2)
17var expected = $"<div class=\"HtmlEncode[[display-label]]\">HtmlEncode[[SomeProperty]]</div>{Environment.NewLine}" + 18$"<div class=\"HtmlEncode[[display-field]]\">HtmlEncode[[PropValue]]</div>{Environment.NewLine}";
Rendering\HtmlHelperDropDownListExtensionsTest.cs (27)
25"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 26"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 27"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 28"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 48"<option value=\"\">HtmlEncode[[--select--]]</option>" + Environment.NewLine + 49"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 50"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 51"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 52"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 72"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 73"<option value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 97"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 98"<option value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 123"<option value=\"\">HtmlEncode[[--select--]]</option>" + Environment.NewLine + 124"<option value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 125"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 149"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 150"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 151"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 152"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 172"<option value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 173"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 198"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 199"<option value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 223"<option value=\"\">HtmlEncode[[--select--]]</option>" + Environment.NewLine + 224"<option value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 225"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine +
Rendering\HtmlHelperListBoxExtensionsTest.cs (16)
25"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 26"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 27"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 28"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 48"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 49"<option value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 73"<option value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 74"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 98"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 99"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 100"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 101"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 120"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 121"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine + 145"<option value=\"HtmlEncode[[4]]\">HtmlEncode[[Four]]</option>" + Environment.NewLine + 146"<option value=\"HtmlEncode[[5]]\">HtmlEncode[[Five]]</option>" + Environment.NewLine +
Rendering\HtmlHelperPartialExtensionsTest.cs (16)
401Environment.NewLine + 402"location1" + Environment.NewLine + 430Environment.NewLine + 431"location1" + Environment.NewLine + 459Environment.NewLine + 460"location1" + Environment.NewLine + 461"location2" + Environment.NewLine + 462"location3" + Environment.NewLine + 490Environment.NewLine + 491"location1" + Environment.NewLine + 519Environment.NewLine + 520"location1" + Environment.NewLine + 548Environment.NewLine + 549"location1" + Environment.NewLine + 550"location2" + Environment.NewLine + 551"location3" + Environment.NewLine +
Rendering\HtmlHelperSelectTest.cs (168)
84Environment.NewLine + 85"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 86"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 87"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 90Environment.NewLine + 91"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 92"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 93"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 99Environment.NewLine + 101Environment.NewLine + 102"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 103"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 106Environment.NewLine + 107"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 108"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 109"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 115Environment.NewLine + 116"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 117"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 118"</optgroup>" + Environment.NewLine + 119"<optgroup label=\"HtmlEncode[[Group Two]]\">" + Environment.NewLine + 120"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 121"</optgroup>" + Environment.NewLine + 122"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 125Environment.NewLine + 126"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 127"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 128"</optgroup>" + Environment.NewLine + 129"<optgroup label=\"HtmlEncode[[Group Two]]\">" + Environment.NewLine + 130"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 131"</optgroup>" + Environment.NewLine + 132"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 138Environment.NewLine + 139"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 140"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 141"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 142"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 143"</optgroup>" + Environment.NewLine + 146Environment.NewLine + 147"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 148"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 149"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 150"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 151"</optgroup>" + Environment.NewLine + 157Environment.NewLine + 158"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 159"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 160"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 161"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 162"</optgroup>" + Environment.NewLine + 165Environment.NewLine + 166"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 167"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 168"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 169"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 170"</optgroup>" + Environment.NewLine + 187Environment.NewLine + 188"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 189"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 190"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 193Environment.NewLine + 194"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 195"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 196"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 199Environment.NewLine + 200"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 201"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 202"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 208Environment.NewLine + 210Environment.NewLine + 211"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 212"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 215Environment.NewLine + 216"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 217"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 218"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 221Environment.NewLine + 222"<option disabled=\"HtmlEncode[[disabled]]\" selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 223"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 224"<option disabled=\"HtmlEncode[[disabled]]\" selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 230Environment.NewLine + 231"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 232"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 233"</optgroup>" + Environment.NewLine + 234"<optgroup label=\"HtmlEncode[[Group Two]]\">" + Environment.NewLine + 235"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 236"</optgroup>" + Environment.NewLine + 237"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 240Environment.NewLine + 241"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 242"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 243"</optgroup>" + Environment.NewLine + 244"<optgroup label=\"HtmlEncode[[Group Two]]\">" + Environment.NewLine + 245"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 246"</optgroup>" + Environment.NewLine + 247"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 250Environment.NewLine + 251"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 252"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 253"</optgroup>" + Environment.NewLine + 254"<optgroup label=\"HtmlEncode[[Group Two]]\">" + Environment.NewLine + 255"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 256"</optgroup>" + Environment.NewLine + 257"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 263Environment.NewLine + 264"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 265"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 266"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 267"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 268"</optgroup>" + Environment.NewLine + 271Environment.NewLine + 272"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 273"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 274"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 275"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 276"</optgroup>" + Environment.NewLine + 279Environment.NewLine + 280"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 281"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 282"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 283"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 284"</optgroup>" + Environment.NewLine + 290"<optgroup disabled=\"HtmlEncode[[disabled]]\" label=\"HtmlEncode[[Disabled Group]]\">" + Environment.NewLine + 291"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 292"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 293"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 294"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 295"</optgroup>" + Environment.NewLine + 298"<optgroup disabled=\"HtmlEncode[[disabled]]\" label=\"HtmlEncode[[Disabled Group]]\">" + Environment.NewLine + 299"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 300"<option value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 301"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 302"<option value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 303"</optgroup>" + Environment.NewLine + 306"<optgroup disabled=\"HtmlEncode[[disabled]]\" label=\"HtmlEncode[[Disabled Group]]\">" + Environment.NewLine + 307"<option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 308"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 309"<option value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 310"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 311"</optgroup>" + Environment.NewLine + 697Environment.NewLine + 698"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 699"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 700"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 724"<select id=\"HtmlEncode[[unrelated]]\" name=\"HtmlEncode[[unrelated]]\"><option value=\"HtmlEncode[[0]]\">HtmlEncode[[Zero]]</option>" + Environment.NewLine + 725"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 726"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 727"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 1045Environment.NewLine + 1046"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[1]]\">HtmlEncode[[One]]</option>" + Environment.NewLine + 1047"<option selected=\"HtmlEncode[[selected]]\" value=\"HtmlEncode[[2]]\">HtmlEncode[[Two]]</option>" + Environment.NewLine + 1048"<option disabled=\"HtmlEncode[[disabled]]\" value=\"HtmlEncode[[3]]\">HtmlEncode[[Three]]</option>" + Environment.NewLine + 1511$"{ GetOption(SelectSources.ModelStateEntry, source) }{ Environment.NewLine }" + 1512$"{ GetOption(SelectSources.ModelStateEntryWithPrefix, source) }{ Environment.NewLine }" + 1513$"{ GetOption(SelectSources.ViewDataEntry, source) }{ Environment.NewLine }" + 1514$"{ GetOption(SelectSources.PropertyOfViewDataEntry, source) }{ Environment.NewLine }" + 1515$"{ GetOption(SelectSources.ViewDataEntryWithPrefix, source) }{ Environment.NewLine }" + 1516$"{ GetOption(SelectSources.PropertyOfViewDataEntryWithPrefix, source) }{ Environment.NewLine }" + 1517$"{ GetOption(SelectSources.ModelValue, source) }{ Environment.NewLine }" + 1518$"{ GetOption(SelectSources.PropertyOfModel, source) }{ Environment.NewLine }" + 1526$"{ GetOption(SelectSources.ModelStateEntry, source) }{ Environment.NewLine }" + 1527$"{ GetOption(SelectSources.ModelStateEntryWithPrefix, source) }{ Environment.NewLine }" + 1528$"{ GetOption(SelectSources.ViewDataEntry, source) }{ Environment.NewLine }" + 1529$"{ GetOption(SelectSources.PropertyOfViewDataEntry, source) }{ Environment.NewLine }" + 1530$"{ GetOption(SelectSources.ViewDataEntryWithPrefix, source) }{ Environment.NewLine }" + 1531$"{ GetOption(SelectSources.PropertyOfViewDataEntryWithPrefix, source) }{ Environment.NewLine }" + 1532$"{ GetOption(SelectSources.ModelValue, source) }{ Environment.NewLine }" + 1533$"{ GetOption(SelectSources.PropertyOfModel, source) }{ Environment.NewLine }" +
Rendering\HtmlHelperTextAreaExtensionsTest.cs (7)
29"<textarea id=\"HtmlEncode[[Property1]]\" name=\"HtmlEncode[[Property1]]\">" + Environment.NewLine + 48"<textarea id=\"HtmlEncode[[Property1]]\" name=\"HtmlEncode[[Property1]]\">" + Environment.NewLine + 67"<textarea id=\"HtmlEncode[[Property1]]\" name=\"HtmlEncode[[Property1]]\">" + Environment.NewLine + 87Environment.NewLine + 107Environment.NewLine + 124"name=\"HtmlEncode[[Property1]]\" rows=\"HtmlEncode[[1]]\">" + Environment.NewLine + 141"name=\"HtmlEncode[[Property1]]\" rows=\"HtmlEncode[[1]]\">" + Environment.NewLine +
Rendering\HtmlHelperTextAreaTest.cs (6)
49"<textarea id=\"HtmlEncode[[pre_Property3_key_]]\" name=\"HtmlEncode[[pre.Property3[key]]]\">" + Environment.NewLine + 54"<textarea id=\"HtmlEncode[[pre_Property4_Property5]]\" name=\"HtmlEncode[[pre.Property4.Property5]]\">" + Environment.NewLine + 59"<textarea id=\"HtmlEncode[[pre_Property4_Property6_0_]]\" name=\"HtmlEncode[[pre.Property4.Property6[0]]]\">" + Environment.NewLine + 96"<textarea id=\"HtmlEncode[[pre_Property3_key_]]\" name=\"HtmlEncode[[pre.Property3[key]]]\">" + Environment.NewLine + 101"<textarea id=\"HtmlEncode[[pre_Property4_Property5]]\" name=\"HtmlEncode[[pre.Property4.Property5]]\">" + Environment.NewLine + 106"<textarea id=\"HtmlEncode[[pre_Property4_Property6_0_]]\" name=\"HtmlEncode[[pre.Property4.Property6[0]]]\">" + Environment.NewLine +
Rendering\HtmlHelperValidationSummaryTest.cs (84)
26"<ul><li style=\"display:none\"></li>" + Environment.NewLine + 30"<li style=\"display:none\"></li>" + Environment.NewLine + 33"<span>HtmlEncode[[This is my message]]</span>" + Environment.NewLine + 34"<ul><li style=\"display:none\"></li>" + Environment.NewLine + 37"<h3>HtmlEncode[[This is my message]]</h3>" + Environment.NewLine + 38"<ul><li style=\"display:none\"></li>" + Environment.NewLine + 42"<span>HtmlEncode[[This is my message]]</span>" + Environment.NewLine + 43"<ul><li style=\"display:none\"></li>" + Environment.NewLine + 47"<h3>HtmlEncode[[This is my message]]</h3>" + Environment.NewLine + 48"<ul><li style=\"display:none\"></li>" + Environment.NewLine + 75"<li>HtmlEncode[[This is my validation message]]</li>" + Environment.NewLine + 78"<li>HtmlEncode[[This is my validation message]]</li>" + Environment.NewLine + 97"<li>HtmlEncode[[This is an error for the model root.]]</li>" + Environment.NewLine + 98"<li>HtmlEncode[[This is another error for the model root.]]</li>" + Environment.NewLine + 101"<li>HtmlEncode[[This is an error for Property3.]]</li>" + Environment.NewLine + 104"<li>HtmlEncode[[This is an error for Property2.]]</li>" + Environment.NewLine + 105"<li>HtmlEncode[[This is another error for Property2.]]</li>" + Environment.NewLine + 106"<li>HtmlEncode[[The value '' is not valid for Property2.]]</li>" + Environment.NewLine + 107"<li>HtmlEncode[[This is an error for Property3.OrderedProperty3.]]</li>" + Environment.NewLine + 108"<li>HtmlEncode[[This is an error for Property3.OrderedProperty2.]]</li>" + Environment.NewLine + 109"<li>HtmlEncode[[This is an error for Property3.Property2.]]</li>" + Environment.NewLine + 110"<li>HtmlEncode[[This is an error for Property3.]]</li>" + Environment.NewLine + 111"<li>HtmlEncode[[This is an error for the model root.]]</li>" + Environment.NewLine + 112"<li>HtmlEncode[[This is another error for the model root.]]</li>" + Environment.NewLine + 302"<li>HtmlEncode[[New error for Property2.]]</li>" + Environment.NewLine + 303"<li>HtmlEncode[[This is an error for Property3.OrderedProperty3.]]</li>" + Environment.NewLine + 304"<li>HtmlEncode[[This is an error for Property3.Property2.]]</li>" + Environment.NewLine + 305"<li>HtmlEncode[[This is an error for the model root.]]</li>" + Environment.NewLine + 306"<li>HtmlEncode[[This is another error for the model root.]]</li>" + Environment.NewLine + 332"<li>HtmlEncode[[This is an error for Property2.]]</li>" + Environment.NewLine + 333"<li>HtmlEncode[[This is another error for Property2.]]</li>" + Environment.NewLine + 334"<li>HtmlEncode[[The value '' is not valid for Property2.]]</li>" + Environment.NewLine + 335"<li>HtmlEncode[[This is an error for Property3.OrderedProperty3.]]</li>" + Environment.NewLine + 336"<li>HtmlEncode[[This is an error for Property3.OrderedProperty2.]]</li>" + Environment.NewLine + 337"<li>HtmlEncode[[This is an error for Property3.Property2.]]</li>" + Environment.NewLine + 338"<li>HtmlEncode[[This is an error for Property3.]]</li>" + Environment.NewLine + 339"<li>HtmlEncode[[This is an error for the model root.]]</li>" + Environment.NewLine + 340"<li>HtmlEncode[[This is another error for the model root.]]</li>" + Environment.NewLine + 341"<li>HtmlEncode[[non-existent-error1]]</li>" + Environment.NewLine + 342"<li>HtmlEncode[[non-existent-error2]]</li>" + Environment.NewLine + 343"<li>HtmlEncode[[non-existent-error3]]</li>" + Environment.NewLine + 368"<li>HtmlEncode[[Property1 error]]</li>" + Environment.NewLine + 369"<li>HtmlEncode[[Property2[0].OrderedProperty1 error]]</li>" + Environment.NewLine + 370"<li>HtmlEncode[[Property2[0].Property1 error]]</li>" + Environment.NewLine + 371"<li>HtmlEncode[[Property2[2].Property3 error]]</li>" + Environment.NewLine + 372"<li>HtmlEncode[[Property2[10].Property2 error]]</li>" + Environment.NewLine + 398"<li>HtmlEncode[[[0].OrderedProperty2 error]]</li>" + Environment.NewLine + 399"<li>HtmlEncode[[[0].OrderedProperty1 error]]</li>" + Environment.NewLine + 400"<li>HtmlEncode[[[0].Property1 error]]</li>" + Environment.NewLine + 401"<li>HtmlEncode[[[2].OrderedProperty3 error]]</li>" + Environment.NewLine + 402"<li>HtmlEncode[[[2].Property3 error]]</li>" + Environment.NewLine + 428"<li>HtmlEncode[[[0].OrderedProperty2 error]]</li>" + Environment.NewLine + 429"<li>HtmlEncode[[[0].OrderedProperty1 error]]</li>" + Environment.NewLine + 430"<li>HtmlEncode[[[0].Property1 error]]</li>" + Environment.NewLine + 431"<li>HtmlEncode[[[2].OrderedProperty3 error]]</li>" + Environment.NewLine + 432"<li>HtmlEncode[[[2].Property3 error]]</li>" + Environment.NewLine + 433"<li>HtmlEncode[[OrderedProperty1 error]]</li>" + Environment.NewLine + 434"<li>HtmlEncode[[OrderedProperty2 error]]</li>" + Environment.NewLine + 462"<li>HtmlEncode[[This is an error for OrderedProperty3.]]</li>" + Environment.NewLine + 463"<li>HtmlEncode[[This is an error for OrderedProperty2.]]</li>" + Environment.NewLine + 464"<li>HtmlEncode[[This is another error for OrderedProperty2.]]</li>" + Environment.NewLine + 465"<li>HtmlEncode[[This is yet-another error for OrderedProperty2.]]</li>" + Environment.NewLine + 466"<li>HtmlEncode[[This is an error for OrderedProperty1.]]</li>" + Environment.NewLine + 467"<li>HtmlEncode[[This is an error for Property3.]]</li>" + Environment.NewLine + 468"<li>HtmlEncode[[This is an error for Property1.]]</li>" + Environment.NewLine + 469"<li>HtmlEncode[[This is another error for Property1.]]</li>" + Environment.NewLine + 470"<li>HtmlEncode[[This is an error for Property2.]]</li>" + Environment.NewLine + 471"<li>HtmlEncode[[This is another error for Property2.]]</li>" + Environment.NewLine + 472"<li>HtmlEncode[[This is an error for LastProperty.]]</li>" + Environment.NewLine + 503"<ul><li>HtmlEncode[[Error for Property1]]</li>" + Environment.NewLine + 535"<span>HtmlEncode[[Custom Message]]</span>" + Environment.NewLine + 536"<ul><li>HtmlEncode[[Error for Property1]]</li>" + Environment.NewLine + 554"<div>HtmlEncode[[Custom Message]]</div>" + Environment.NewLine + 555"<ul><li>HtmlEncode[[Error for Property1]]</li>" + Environment.NewLine + 574Environment.NewLine + 575"<ul><li>HtmlEncode[[Error for root]]</li>" + Environment.NewLine + 593"<span>HtmlEncode[[Custom Message]]</span>" + Environment.NewLine + 594"<ul><li>HtmlEncode[[Error for Property1]]</li>" + Environment.NewLine + 612"<div>HtmlEncode[[Custom Message]]</div>" + Environment.NewLine + 613"<ul><li>HtmlEncode[[Error for Property1]]</li>" + Environment.NewLine + 632Environment.NewLine + 633"<ul><li>HtmlEncode[[Error for root]]</li>" + Environment.NewLine + 655Environment.NewLine + 656"<ul><li>HtmlEncode[[Error for root]]</li>" + Environment.NewLine +
ViewComponents\DefaultViewComponentSelectorTest.cs (4)
97"The view component name 'Ambiguous' matched multiple types:" + Environment.NewLine + 99"Name: 'Namespace1.Ambiguous'" + Environment.NewLine + 118$"The view component name '{name}' matched multiple types:" + Environment.NewLine + 120"Name: 'Ambiguous.Name'" + Environment.NewLine +
ViewComponents\ViewViewComponentResultTest.cs (4)
145var expected = string.Join(Environment.NewLine, 183var expected = string.Join(Environment.NewLine, 221var expected = string.Join(Environment.NewLine, 379var expected = string.Join(Environment.NewLine,
ViewResultTest.cs (3)
77Environment.NewLine, 115Environment.NewLine, 155Environment.NewLine,
Microsoft.AspNetCore.OpenApi.Build.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
Microsoft.AspNetCore.OpenApi.Tests (2)
Integration\OpenApiDocumentIntegrationTests.cs (1)
43? Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "Integration", "snapshots")
Integration\OpenApiDocumentLocalizationTests.cs (1)
15? Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "Integration", "snapshots")
Microsoft.AspNetCore.Routing (7)
EndpointMiddleware.cs (3)
108Environment.NewLine + 116Environment.NewLine + 124Environment.NewLine +
Matching\CandidateSet.cs (2)
350$"The following endpoints were found with the same priority:" + Environment.NewLine + 351string.Join(Environment.NewLine, duplicates.Select(e => e.DisplayName));
Matching\DefaultEndpointSelector.cs (2)
122Environment.NewLine, 123string.Join(Environment.NewLine, matches.Select(e => e.DisplayName)));
Microsoft.AspNetCore.Routing.FunctionalTests (3)
EndpointRoutingIntegrationTest.cs (2)
20Environment.NewLine + 25Environment.NewLine +
MinimalFormTests.cs (1)
211Environment.NewLine +
Microsoft.AspNetCore.Routing.Tests (17)
EndpointMiddlewareTest.cs (4)
100Environment.NewLine + 129Environment.NewLine + 226Environment.NewLine + 323Environment.NewLine +
EndpointNameAddressSchemeTest.cs (1)
173Assert.Equal(String.Join(Environment.NewLine, @"The following endpoints with a duplicate endpoint name were found.",
Internal\DfaGraphWriterTest.cs (6)
33Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {", 35"}") + Environment.NewLine, writer.ToString()); 56Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {", 58@"}") + Environment.NewLine, writer.ToString()); 80Assert.Equal(String.Join(Environment.NewLine, @"digraph DFA {", 86@"}") + Environment.NewLine, sdf);
Matching\CandidateSetTest.cs (2)
325Environment.NewLine + 327Environment.NewLine +
Matching\DefaultEndpointSelectorTest.cs (3)
165@"The request matched multiple endpoints. Matches: " + Environment.NewLine + Environment.NewLine + 166"test: /test2" + Environment.NewLine + "test: /test3", ex.Message);
Tree\LinkGenerationDecisionTreeTest.cs (1)
725var newLine = Environment.NewLine;
Microsoft.AspNetCore.Server.HttpSys (5)
HttpSysOptions.cs (2)
19internal static readonly int DefaultMaxAccepts = 5 * Environment.ProcessorCount; 75/// The default is 5 times the number of processors as returned by <see cref="Environment.ProcessorCount" />.
NativeInterop\SafeNativeOverlapped.cs (1)
14private static bool HasShutdownStarted => Environment.HasShutdownStarted
NativeInterop\UrlGroup.cs (2)
167throw new HttpSysException((int)statusCode, Resources.FormatException_AccessDenied(uriPrefix, Environment.UserDomainName + @"\" + Environment.UserName));
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (5)
DelegateTests.cs (1)
173Assert.True(Environment.OSVersion.Version < new Version(10, 0, 22000), "This should be supported on Win 11.");
Http2Tests.cs (2)
195if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 259if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0))
HttpsTests.cs (1)
192if (Environment.OSVersion.Version > new Version(10, 0, 19043, 0))
Utilities.cs (1)
41IsWin8orLater = (Environment.OSVersion.Version >= win8Version);
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Utilities.cs (1)
25IsWin8orLater = (Environment.OSVersion.Version >= win8Version);
Microsoft.AspNetCore.Server.IIS (4)
src\Shared\RazorViews\BaseView.cs (1)
283return string.Join("<br />" + Environment.NewLine,
StartupHook.cs (3)
28var detailedErrors = Environment.GetEnvironmentVariable("ASPNETCORE_DETAILEDERRORS"); 32var aspnetCoreEnvironment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); 35var dotnetEnvironment = Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
Microsoft.AspNetCore.Server.IISIntegration (6)
WebHostBuilderIISExtensions.cs (6)
41var port = hostBuilder.GetSetting(ServerPort) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{ServerPort}"); 42var path = hostBuilder.GetSetting(ServerPath) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{ServerPath}"); 43var pairingToken = hostBuilder.GetSetting(PairingToken) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{PairingToken}"); 44var iisAuth = hostBuilder.GetSetting(IISAuth) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{IISAuth}"); 45var websocketsSupported = hostBuilder.GetSetting(IISWebSockets) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{IISWebSockets}"); 51isWebSocketsSupported = (Environment.OSVersion.Version >= new Version(6, 2));
Microsoft.AspNetCore.Server.IntegrationTesting (21)
Common\DotNetCommands.cs (5)
18var dotnetHome = Environment.GetEnvironmentVariable("DOTNET_HOME"); 20var dotnetRoot = Environment.GetEnvironmentVariable("DOTNET_ROOT"); 22var dotnetInstallDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR"); 24var userProfile = Environment.GetEnvironmentVariable("USERPROFILE"); 25var home = Environment.GetEnvironmentVariable("HOME");
Deployers\NginxDeployer.cs (6)
103var retVal = Environment.GetEnvironmentVariable("LOGNAME") 104?? Environment.GetEnvironmentVariable("USER") 105?? Environment.GetEnvironmentVariable("USERNAME"); 153Logger.LogTrace($"Config File Content:{Environment.NewLine}===START CONFIG==={Environment.NewLine}{{configContent}}{Environment.NewLine}===END CONFIG===", DeploymentParameters.ServerConfigTemplateContent);
Deployers\RemoteWindowsDeployer\RemoteWindowsDeployer.cs (3)
183Logger.LogTrace($"Config File Content:{Environment.NewLine}===START CONFIG==={Environment.NewLine}{{configContent}}{Environment.NewLine}===END CONFIG===", webConfig.ToString());
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
xunit\IISExpressAncmSchema.cs (2)
22Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
xunit\SkipIfEnvironmentVariableNotEnabled.cs (1)
26return string.Equals(Environment.GetEnvironmentVariable(_environmentVariableName), "true", StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (9)
IISDeployer.cs (3)
79Logger.LogInformation(Environment.OSVersion.ToString()); 512HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\ApplicationHost.config"), fileNamePrefix + ".inetsrv.applicationHost.config"); 513HelixHelper.PreserveFile(Path.Combine(Environment.SystemDirectory, @"inetsrv\config\redirection.config"), fileNamePrefix + ".inetsrv.redirection.config");
IISDeployerBase.cs (2)
97if (!File.Exists(Environment.ExpandEnvironmentVariables(ancmFile))) 100if (!File.Exists(Environment.ExpandEnvironmentVariables(ancmFile)))
IISExpressDeployer.cs (2)
50Logger.LogInformation(Environment.OSVersion.ToString()); 384var iisExpressPath = Path.Combine(Environment.GetEnvironmentVariable("SystemDrive") + "\\", programFiles, "IIS Express", "iisexpress.exe");
ProcessTracker.cs (2)
18if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows) || Environment.OSVersion.Version < new Version(6, 2)) 24var jobHandle = CreateJobObject(IntPtr.Zero, name: $"ProcessTracker{Environment.ProcessId}");
Microsoft.AspNetCore.Server.Kestrel.Core (25)
Middleware\HttpsConnectionMiddleware.cs (2)
536if (Environment.OSVersion.Version < new Version(6, 3) // Missing ALPN support 538|| (Environment.OSVersion.Version < new Version(10, 0) && !enableHttp2OnWindows81))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
Systemd\KestrelServerOptionsSystemdExtensions.cs (3)
39if (string.Equals(Environment.ProcessId.ToString(CultureInfo.InvariantCulture), Environment.GetEnvironmentVariable(ListenPidEnvVar), StringComparison.Ordinal)) 42if (int.TryParse(Environment.GetEnvironmentVariable(ListenFdsEnvVar), NumberStyles.None, NumberFormatInfo.InvariantInfo, out var listenFds)
TlsConfigurationLoader.cs (3)
190var appData = Environment.GetEnvironmentVariable("APPDATA"); 191var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (14)
DiagnosticMemoryPoolTests.cs (4)
118Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 133Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 155Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", ode.Message); 172Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message);
LoggingStreamTests.cs (1)
39Assert.Equal($"Write[{bufferLength}]{Environment.NewLine}{expectedOutput}", mockLogger.Logs);
MemoryPoolTests.cs (1)
47Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPool'.", exception.Message);
src\Servers\Kestrel\shared\test\RevocationResponder.cs (1)
15Environment.GetEnvironmentVariable("TRACE_REVOCATION_RESPONSE") != null;
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (7)
119throw new TimeoutException($"Did not receive a complete response within {Timeout}.{Environment.NewLine}{Environment.NewLine}" + 120$"Expected:{Environment.NewLine}{expected}{Environment.NewLine}{Environment.NewLine}" + 121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}",
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
InMemoryTransportBenchmark.cs (1)
79throw new InvalidOperationException(string.Join(Environment.NewLine,
NamedPipesTransportBenchmark.cs (1)
81throw new InvalidOperationException(string.Join(Environment.NewLine,
SchedulerBenchmark.cs (1)
20private static readonly int IOQueueCount = Math.Min(Environment.ProcessorCount, 16);
src\Servers\Kestrel\Transport.Sockets\src\Internal\IOQueue.cs (1)
88int processorCount = Environment.ProcessorCount;
Microsoft.AspNetCore.Server.Kestrel.Tests (2)
KestrelConfigurationLoaderTests.cs (2)
2142var appData = Environment.GetEnvironmentVariable("APPDATA"); 2143var home = Environment.GetEnvironmentVariable("HOME");
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
NamedPipeTransportOptions.cs (2)
19/// Defaults to <see cref="Environment.ProcessorCount" /> rounded down and clamped between 1 and 16. 21public int ListenerQueueCount { get; set; } = Math.Min(Environment.ProcessorCount, 16);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (3)
Internal\IOQueue.cs (1)
88int processorCount = Environment.ProcessorCount;
SocketConnectionFactoryOptions.cs (1)
37/// Defaults to a value based on and limited to <see cref="Environment.ProcessorCount" />.
SocketTransportOptions.cs (1)
31/// Defaults to a value based on and limited to <see cref="Environment.ProcessorCount" />.
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
Microsoft.AspNetCore.SignalR.Common.Tests (4)
Internal\Protocol\MessagePackHubProtocolTestBase.cs (4)
280Assert.True(string.Equals(actual, testData.Binary, StringComparison.Ordinal), $"Binary encoding changed from{Environment.NewLine} [{testData.Binary}]{Environment.NewLine} to{Environment.NewLine} [{actual}]{Environment.NewLine}Please verify the MsgPack output and update the baseline");
Microsoft.AspNetCore.SignalR.StackExchangeRedis (3)
Internal\AckHandler.cs (2)
51var currentTick = Environment.TickCount64; 91CreatedTick = Environment.TickCount64;
RedisHubLifetimeManager.cs (1)
814return $"{Environment.MachineName}_{Guid.NewGuid():N}";
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (7)
Docker.cs (6)
63foreach (var dir in Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator)) 133output = output.Trim().Replace(Environment.NewLine, ""); 136Environment.SetEnvironmentVariable("REDIS_CONNECTION", $"{output}:6379"); 167throw new Exception($"Command '{fileName} {arguments}' failed with exit code '{exitCode}'. Output:{Environment.NewLine}{output}"); 181output = string.Join(Environment.NewLine, lines.ToArray()); 190output = string.Join(Environment.NewLine, lines);
Startup.cs (1)
24options.Configuration.EndPoints.Add(Environment.GetEnvironmentVariable("REDIS_CONNECTION"));
Microsoft.AspNetCore.SignalR.Tests (4)
NativeAotTests.cs (4)
420"Provider: {0}" + Environment.NewLine + 421"Log level: {1}" + Environment.NewLine + 422"Event id: {2}" + Environment.NewLine + 423"Exception: {3}" + Environment.NewLine +
Microsoft.AspNetCore.SignalR.Tests.Utils (8)
src\Shared\SignalR\InProcessTestServer.cs (3)
123throw new TimeoutException($"Timed out waiting for application to start.{Environment.NewLine}Startup Logs:{Environment.NewLine}{RenderLogs(logs)}"); 148foreach (var line in message.Split(new[] { Environment.NewLine }, StringSplitOptions.None))
src\Shared\SignalR\VerifyNoErrorScope.cs (5)
46errorMessage += Environment.NewLine; 47errorMessage += string.Join(Environment.NewLine, results.Select(record => 54lineMessage += Environment.NewLine; 56lineMessage += Environment.NewLine; 58lineMessage += Environment.NewLine;
Microsoft.AspNetCore.SpaProxy (3)
SpaProxyLaunchManager.cs (3)
223$processId = Get-Process -PID {Environment.ProcessId} -ErrorAction Stop; 286ps {Environment.ProcessId}; 290ps {Environment.ProcessId} > /dev/null;
Microsoft.AspNetCore.SpaServices.Extensions (1)
Npm\NodeScriptRunner.cs (1)
138+ $" Current PATH enviroment variable is: { Environment.GetEnvironmentVariable("PATH") }\n"
Microsoft.AspNetCore.SpaServices.Extensions.Tests (1)
ListLoggerFactory.cs (1)
87TestOutputHelper?.WriteLine(message + Environment.NewLine);
Microsoft.AspNetCore.TestHost (1)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-rc.1.25524.106\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
33if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds))
Microsoft.AspNetCore.TestHost.Tests (2)
HttpContextBuilderTests.cs (2)
178var bytes = Encoding.UTF8.GetBytes("BodyStarted" + Environment.NewLine); 214await c.Response.WriteAsync("BodyStarted" + Environment.NewLine);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
653Assert.Equal(NormalizePath(Environment.CurrentDirectory), NormalizePath(builder.Environment.ContentRootPath)); 669options.StartInfo.WorkingDirectory = Environment.SystemDirectory;
Microsoft.AspNetCore.Watch.BrowserRefresh (4)
BrowserRefreshMiddleware.cs (1)
30=> Environment.GetEnvironmentVariable(name) is { Length: > 0 } value ? value : null;
BrowserScriptMiddleware.cs (2)
55var endpoint = Environment.GetEnvironmentVariable("ASPNETCORE_AUTO_RELOAD_WS_ENDPOINT")!; 56var serverKey = Environment.GetEnvironmentVariable("ASPNETCORE_AUTO_RELOAD_WS_KEY") ?? string.Empty;
StartupHook.cs (1)
10Environment.SetEnvironmentVariable("__ASPNETCORE_BROWSER_TOOLS", "true");
Microsoft.AspNetCore.Watch.BrowserRefresh.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.AspNetCore.WebSockets.ConformanceTests (8)
Autobahn\AutobahnTester.cs (1)
123Assert.True(failures.Length == 0, "Autobahn results did not meet expectations:" + Environment.NewLine + failures.ToString());
Autobahn\Executable.cs (1)
22foreach (var dir in Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator))
Autobahn\Wstest.cs (1)
28var location = Environment.GetEnvironmentVariable("ASPNETCORE_WSTEST_PATH");
AutobahnTests.cs (2)
35var reportDir = Environment.GetEnvironmentVariable("AUTOBAHN_SUITES_REPORT_DIR"); 85var pf = Environment.GetEnvironmentVariable("PROGRAMFILES");
SkipIfWsTestNotPresentAttribute.cs (3)
16!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TEAMCITY_VERSION")) || 17string.Equals(Environment.GetEnvironmentVariable("TRAVIS"), "true", StringComparison.OrdinalIgnoreCase) || 18string.Equals(Environment.GetEnvironmentVariable("APPVEYOR"), "true", StringComparison.OrdinalIgnoreCase);
Microsoft.AspNetCore.WebUtilities (1)
AspNetCoreTempDirectory.cs (1)
19var temp = Environment.GetEnvironmentVariable("ASPNETCORE_TEMP") ?? // ASPNETCORE_TEMP - User set temporary location.
Microsoft.Build (157)
BackEnd\BuildManager\BuildManager.cs (6)
797switch (Environment.GetEnvironmentVariable("MSBuildDebugBuildManagerOnStart")) 1115else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILD_HOST_NAME"))) 1117host = Environment.GetEnvironmentVariable("MSBUILD_HOST_NAME"); 1119else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSCODE_CWD")) || Environment.GetEnvironmentVariable("TERM_PROGRAM") == "vscode") 2255if (Environment.GetEnvironmentVariable("MSBUILDCLEARXMLCACHEONBUILDMANAGER") == "1")
BackEnd\BuildManager\BuildParameters.cs (5)
429set => _enableNodeReuse = Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1" ? false : value; 1005backing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable(environmentVariable)) || @default; 1018string environmentValue = Environment.GetEnvironmentVariable(environmentVariable); 1043if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1") // For example to disable node reuse within Visual Studio 1048if (Environment.GetEnvironmentVariable("MSBUILDDETAILEDSUMMARY") == "1") // For example to get detailed summary within Visual Studio
BackEnd\Client\MSBuildClient.cs (1)
490foreach (DictionaryEntry envVar in Environment.GetEnvironmentVariables())
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (2)
135_debugForceCaching = Environment.GetEnvironmentVariable("MSBUILDDEBUGFORCECACHING") == "1"; 1555file.WriteLine("{0}({1})-{2}: {3}", Thread.CurrentThread.Name, Environment.CurrentManagedThreadId, DateTime.UtcNow.Ticks, message);
BackEnd\Components\Caching\ConfigCache.cs (4)
40if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDCONFIGCACHESWEEPTHRESHHOLD"), out _sweepThreshhold)) 250if (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEAGGRESSIVECACHING"))) 387capacity => new ConcurrentDictionary<int, BuildRequestConfiguration>(Environment.ProcessorCount, capacity)); 392_byMetadata = new ConcurrentDictionary<ConfigurationMetadata, BuildRequestConfiguration>(Environment.ProcessorCount, configurationsById.Count);
BackEnd\Components\Communications\NodeLauncher.cs (5)
73if (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDNODEWINDOW"))) 126"Failed to launch node from {0}. CommandLine: {1}" + Environment.NewLine + "{2}", 196string useMSBuildServerEnvVarValue = Environment.GetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName); 201Environment.SetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName, "0"); 209Environment.SetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName, useMSBuildServerEnvVarValue);
BackEnd\Components\Communications\NodeProviderInProc.cs (1)
211if (Environment.GetEnvironmentVariable("MSBUILDINPROCENVCHECK") == "1")
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
210string msbuildExeName = Environment.GetEnvironmentVariable("MSBUILD_EXE_NAME");
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (3)
145s_msbuildTaskHostName = Environment.GetEnvironmentVariable("MSBUILDTASKHOST_EXE_NAME"); 376s_msbuildName = Environment.GetEnvironmentVariable("MSBUILD_EXE_NAME"); 552string envPath = Environment.GetEnvironmentVariable(environmentVariable);
BackEnd\Components\Logging\LoggingService.cs (1)
317string queueCapacityEnvironment = Environment.GetEnvironmentVariable("MSBUILDLOGGINGQUEUECAPACITY");
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (4)
231message += Environment.NewLine + "This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER."; 235message += Environment.NewLine + exception.ToString(); 265message += Environment.NewLine + "This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER."; 270message += Environment.NewLine + exception.ToString();
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
36private static readonly ParallelOptions s_parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
BackEnd\Components\RequestBuilder\RequestBuilder.cs (4)
689if (Environment.GetEnvironmentVariable("MSBUILDFORCESTA") == "1") 1137Environment.SetEnvironmentVariable(environmentProperty.Name, environmentProperty.EvaluatedValue, EnvironmentVariableTarget.Process); 1438Environment.SetEnvironmentVariable(entry.Key, null); 1456Environment.SetEnvironmentVariable(entry.Key, entry.Value);
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
1258private static readonly bool s_sortInputsOutputs = (Environment.GetEnvironmentVariable("MSBUILDSORTINPUTSOUTPUTS") == "1");
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
818if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 909if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\RequestBuilder\TaskHost.cs (4)
47private static readonly bool s_breakOnLogAfterTaskReturns = Environment.GetEnvironmentVariable("MSBUILDBREAKONLOGAFTERTASKRETURNS") == "1"; 362_yieldThreadId = Environment.CurrentManagedThreadId; 391ErrorUtilities.VerifyThrow(_yieldThreadId == Environment.CurrentManagedThreadId, "Cannot call Reacquire() on thread {0} when Yield() was called on thread {1}", Environment.CurrentManagedThreadId, _yieldThreadId);
BackEnd\Components\Scheduler\Scheduler.cs (7)
216_schedulingUnlimitedVariable = Environment.GetEnvironmentVariable("MSBUILDSCHEDULINGUNLIMITED"); 227string strNodeLimitOffset = Environment.GetEnvironmentVariable("MSBUILDNODELIMITOFFSET"); 242if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDCORELIMIT"), out _coreLimit) || _coreLimit <= 0) 249if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDNODECOREALLOCATIONWEIGHT"), out _nodeCoreAllocationWeight) 901string customScheduler = Environment.GetEnvironmentVariable("MSBUILDCUSTOMSCHEDULER"); 946string multiplier = Environment.GetEnvironmentVariable("MSBUILDCUSTOMSCHEDULERFORSQLCONFIGURATIONLIMITMULTIPLIER"); 2680file.Write("{0}({1})-{2}: ", Thread.CurrentThread.Name, Environment.CurrentManagedThreadId, _schedulingData.EventTime.Ticks);
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (3)
25private readonly string IncludeDefaultResolver = Environment.GetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER"); 29private readonly string AdditionalResolversFolder = Environment.GetEnvironmentVariable( 35?? Environment.GetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER");
BackEnd\Components\SdkResolution\SdkResolverService.cs (4)
259loggingContext.LogError(new BuildEventFileInfo(sdkReferenceLocation), "SingleResolverFailedToResolveSDK", sdk.Name, resolvers[0].Name, string.Join(Environment.NewLine, errors)); 264loggingContext.LogError(new BuildEventFileInfo(sdkReferenceLocation), "FailedToResolveSDK", sdk.Name, string.Join($"{Environment.NewLine} ", errors)); 385string resultWarnings = result.Warnings?.Any() == true ? string.Join(Environment.NewLine, result.Warnings) : "null"; 386string resultErrors = result.Errors?.Any() == true ? string.Join(Environment.NewLine, result.Errors) : "null";
BackEnd\Node\OutOfProcNode.cs (5)
566if (Environment.GetEnvironmentVariable("MSBUILDCLEARXMLCACHEONCHILDNODES") == "1") 735Environment.SetEnvironmentVariable(key, null); 742Environment.SetEnvironmentVariable(environmentPair.Key, environmentPair.Value); 826string forwardPropertiesFromChild = Environment.GetEnvironmentVariable("MSBUILDFORWARDPROPERTIESFROMCHILD"); 838string forwardAllProperties = Environment.GetEnvironmentVariable("MSBUILDFORWARDALLPROPERTIESFROMCHILD");
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
1046Environment.NewLine + e.InnerException);
BuildCheck\Checks\UntrustedLocationCheck.cs (4)
66if (Environment.OSVersion.Version.Major >= 6) 82string? locationFromEnv = Environment.GetEnvironmentVariable("XDG_DOWNLOAD_DIR"); 89return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Downloads");
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (4)
173checkContext.DispatchAsCommentFromText(MessageImportance.Low, $"BuildCheck run times{Environment.NewLine}"); 182=> title + Environment.NewLine + String.Join(Environment.NewLine, rowData.Select(a => $"{a.Key},{a.Value}")) + Environment.NewLine;
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommunicationsUtilities.cs (5)
206string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT") ?? ""; 574/// Sets an environment variable using <see cref="Environment.SetEnvironmentVariable(string,string)" />. 577=> Environment.SetEnvironmentVariable(name, value); 597IDictionary vars = Environment.GetEnvironmentVariables(); 957string environmentValue = Environment.GetEnvironmentVariable(environmentVariable);
Construction\ProjectElementContainer.cs (2)
577var leadingWhitespaceNode = XmlDocument.CreateWhitespace(Environment.NewLine + parentIndentation + DEFAULT_INDENT); 578var trailingWhiteSpaceNode = XmlDocument.CreateWhitespace(Environment.NewLine + parentIndentation);
DebugUtils.cs (5)
33string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 54Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 69return ScanNodeMode(Environment.CommandLine); 94var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 102$"{ProcessNodeMode.Value}_{EnvironmentUtilities.ProcessName}_PID={EnvironmentUtilities.CurrentProcessId}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Definition\Project.cs (1)
55private static readonly bool s_debugEvaluation = (Environment.GetEnvironmentVariable("MSBUILDDEBUGEVALUATION") != null);
ElementLocation\XmlDocumentWithLocation.cs (5)
362string windowsFolder = Environment.GetFolderPath(Environment.SpecialFolder.Windows); 384if (String.Equals(Environment.GetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly"), "true", StringComparison.OrdinalIgnoreCase)) 389if (String.Equals(Environment.GetEnvironmentVariable("MSBUILDLOADALLFILESASREADONLY"), "1", StringComparison.OrdinalIgnoreCase)) 395if (String.Equals(Environment.GetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE"), "1", StringComparison.OrdinalIgnoreCase))
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
Evaluation\ConditionEvaluator.cs (1)
173private static readonly bool s_disableExpressionCaching = (Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEEXPRESSIONS") == "1");
Evaluation\Expander.cs (1)
4280if (Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1")
Evaluation\ItemSpec.cs (1)
584_normalize = options == MatchOnMetadataOptions.PathLike ? (Func<string, string>)(p => FileUtilities.NormalizePathForComparisonNoThrow(p, Environment.CurrentDirectory)) : p => p;
Evaluation\ProjectRootElementCache.cs (3)
76int.TryParse(Environment.GetEnvironmentVariable("MSBUILDPROJECTROOTELEMENTCACHESIZE"), out int cacheSize) ? cacheSize : 200; 81private static readonly bool s_debugLogCacheActivity = Environment.GetEnvironmentVariable("MSBUILDDEBUGXMLCACHE") == "1"; 89private static readonly bool s_сheckFileContent = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDCACHECHECKFILECONTENT"));
ExceptionHandling.cs (3)
418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
FrameworkLocationHelper.cs (8)
138internal static readonly string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); 819string complusInstallRoot = Environment.GetEnvironmentVariable("COMPLUS_INSTALLROOT"); 820string complusVersion = Environment.GetEnvironmentVariable("COMPLUS_VERSION"); 914string programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 936programFilesX64 = Environment.GetEnvironmentVariable("ProgramW6432"); 954string combinedPath = Environment.GetEnvironmentVariable("ReferenceAssemblyRoot");
Instance\ProjectInstance.cs (3)
3042foreach (DictionaryEntry environmentVariable in Environment.GetEnvironmentVariables()) 3059Environment.SetEnvironmentVariable(environmentVariableName, null); 3072Environment.SetEnvironmentVariable(clearedVariable.Key as string, clearedVariable.Value as string);
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
306ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString()); 487ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Instance\TaskRegistry.cs (1)
1560ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskFactoryLoadFailure", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Logging\BaseConsoleLogger.cs (2)
143WriteHandler(Environment.NewLine); 884Traits.LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES"));
Logging\BinaryLogger\BinaryLogger.cs (7)
168_initialIsBinaryLoggerEnabled = Environment.GetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED"); 170Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "true"); 171Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 172Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", bool.TrueString); 318Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging ? "true" : null); 319Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", _initialLogImports ? "1" : null); 320Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", _initialIsBinaryLoggerEnabled);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
1831if (!Environment.Is64BitProcess)
Logging\OptimizedStringIndenter.cs (3)
64int indentedStringLength = segments.Length * (Environment.NewLine.Length + indent); 86Environment.NewLine.CopyTo(output); 87output = output.Slice(Environment.NewLine.Length);
Logging\ParallelLogger\ConsoleOutputAligner.cs (1)
59int estimatedCapacity = message.Length + ((prefixAlreadyWritten ? 0 : prefixWidth) + Environment.NewLine.Length) * (message.Length / averageLineLength + 1);
Logging\TerminalLogger\TerminalLogger.cs (2)
125private readonly string _initialWorkingDirectory = Environment.CurrentDirectory; 265string tlEnvVariable = Environment.GetEnvironmentVariable("MSBUILDTERMINALLOGGER") ?? string.Empty;
LogMessagePacketBase.cs (2)
261private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Resources\Constants.cs (1)
323var environmentType = new Tuple<string, Type>(null, typeof(Environment));
TaskLoggingHelper.cs (3)
1260message += Environment.NewLine + exception.StackTrace; 1625bool diagnostics = Environment.GetEnvironmentVariable("MSBUILDDIAGNOSTICS") != null; 1632message += Environment.NewLine + exception.StackTrace;
Tracing.cs (2)
60string val = Environment.GetEnvironmentVariable("MSBUILDTRACEINTERVAL"); 121Trace.WriteLine(System.Environment.StackTrace);
Utilities\EngineFileUtilities.cs (1)
567string? wildCards = Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes");
Utilities\Utilities.cs (12)
38private static bool s_shouldTreatHigherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT") != null); 44private static bool s_shouldTreatOtherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT") != null); 51private static bool s_uselegacyDefaultToolsVersionBehavior = (Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION") != null); 56private static string s_defaultToolsVersionFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 72s_shouldTreatHigherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT") != null); 73s_shouldTreatOtherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT") != null); 74s_uselegacyDefaultToolsVersionBehavior = (Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION") != null); 75s_defaultToolsVersionFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 551localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 556localAppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Microsoft.Build.BuildCheck.UnitTests (2)
EndToEndTests.cs (2)
145$"Resource for culture {culture} was {(isResourceExpected ? "not " : "")}found in deps.json:{Environment.NewLine}{output.DepsJsonResources.ToString()}"); 150$"Unexpected resource for culture {culture} was found in deps.json:{Environment.NewLine}{output.DepsJsonResources.ToString()}");
Microsoft.Build.CommandLine.UnitTests (18)
CommandLineSwitches_Tests.cs (1)
1570string[] helpMessageLines = item.Value.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
MSBuildServer_Tests.cs (6)
154Environment.SetEnvironmentVariable("MSBUILDUSESERVER", ""); 161Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 212Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "0"); 218Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 335output.ShouldContain($@":MSBuildStartupDirectory:{Environment.CurrentDirectory}:"); 347output.ShouldContain($@":MSBuildStartupDirectory:{Environment.CurrentDirectory}:");
XMake_Tests.cs (11)
605output.EndsWith(Environment.NewLine).ShouldBeTrue(); 649output.EndsWith(Environment.NewLine).ShouldBeFalse(); 657string oldValueForMSBuildLoadMicrosoftTargetsReadOnly = Environment.GetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly"); 665Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly); 949var originalUILanguage = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE); 1139Environment.SetEnvironmentVariable("MyEnvVariable", "1"); 1149Environment.SetEnvironmentVariable("MyEnvVariable", null); 1161string oldValueForMSBuildLoadMicrosoftTargetsReadOnly = Environment.GetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly"); 1198Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly); 1203? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe")
Microsoft.Build.Engine.OM.UnitTests (30)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
Construction\WhiteSpacePreservation_Tests.cs (1)
503if (Environment.NewLine.Length == 2)
DebugUtils.cs (5)
33string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 54Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 69return ScanNodeMode(Environment.CommandLine); 94var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 102$"{ProcessNodeMode.Value}_{EnvironmentUtilities.ProcessName}_PID={EnvironmentUtilities.CurrentProcessId}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Definition\Project_Tests.cs (14)
94<PropertyGroup><NewLine>" + Environment.NewLine + Environment.NewLine + "</NewLine></PropertyGroup>" + 1226string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 1230Environment.SetEnvironmentVariable("VisualStudioVersion", null); 1245Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1256string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 1260Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCD"); 1271Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1281string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 1285Environment.SetEnvironmentVariable("VisualStudioVersion", null); 1299Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 1310string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 1314Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 1331Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Definition\ProjectItem_Tests.cs (1)
2466<I1 Include='f1' M1='{Environment.CurrentDirectory}\b\c' M2='6'/>
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (4)
66Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
Microsoft.Build.Engine.UnitTests (303)
BackEnd\BuildManager_Tests.cs (1)
4108env.SetCurrentDirectory(Environment.CurrentDirectory);
BackEnd\BuildRequestConfiguration_Tests.cs (9)
367string originalValue = Environment.GetEnvironmentVariable("MSBUILDCACHE"); 370Environment.SetEnvironmentVariable("MSBUILDCACHE", "1"); 417Environment.SetEnvironmentVariable("MSBUILDCACHE", originalValue); 468string originalTmp = Environment.GetEnvironmentVariable("TMP"); 469string originalTemp = Environment.GetEnvironmentVariable("TEMP"); 475Environment.SetEnvironmentVariable("TMP", problematicTmpPath); 476Environment.SetEnvironmentVariable("TEMP", problematicTmpPath); 485Environment.SetEnvironmentVariable("TMP", originalTmp); 486Environment.SetEnvironmentVariable("TEMP", originalTemp);
BackEnd\IntrinsicTask_Tests.cs (2)
1825env.SetCurrentDirectory(Environment.CurrentDirectory); 1835<I1 Include='f1' M1='{Environment.CurrentDirectory}\b\c' M2='6'/>
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1326message += Environment.NewLine + "This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER."; 1330message += Environment.NewLine + exception.ToString();
BackEnd\NodePackets_Tests.cs (3)
257string _initialTargetOutputLogging = Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"); 258Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "1"); 349Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging);
BackEnd\RedirectConsoleWriter_Tests.cs (1)
27sb.ToString().ShouldBe($"Line 1{Environment.NewLine}Line 2");
BackEnd\SdkResolverLoader_Tests.cs (6)
336var origIncludeDefault = Environment.GetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER"); 340Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", "false"); 354Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", origIncludeDefault); 364var origResolversFolder = Environment.GetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER"); 385Environment.SetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER", additionalRoot); 394Environment.SetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER", origResolversFolder);
BackEnd\SdkResolverService_Tests.cs (1)
68_logger.Errors[0].Message.ShouldBe(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("FailedToResolveSDK", "notfound", string.Join($"{Environment.NewLine} ", new[] {
BackEnd\TargetResult_Tests.cs (4)
134string oldTmp = Environment.GetEnvironmentVariable("TMP"); 138Environment.SetEnvironmentVariable("TMP", "C:\\}"); 141Environment.SetEnvironmentVariable("TMP", "C:\\{"); 146Environment.SetEnvironmentVariable("TMP", oldTmp);
BinaryLogger_Tests.cs (4)
247$"Buffers starting at position {readCount} differ. First:{Environment.NewLine}{string.Join(",", bytes1)}{Environment.NewLine}Second:{Environment.NewLine}{string.Join(",", bytes2)}"); 464TransientTestFile testFile = testFolder.CreateFile(testFileName, string.Join(Environment.NewLine, new[] { "123", "456" }));
CommunicationUtilities_Tests.cs (3)
22IDictionary referenceVars = Environment.GetEnvironmentVariables(); 55Environment.GetEnvironmentVariable(testName1).ShouldBe(testValue); 56Environment.GetEnvironmentVariable(testName2).ShouldBe(null);
ConsoleLogger_Tests.cs (20)
128foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables()) 615console.ToString().ShouldContain(message + Environment.NewLine); 670console.ToString().ShouldMatch($@"<{expectedColor}><cyan>\d\d:\d\d:\d\d\.\d\d\d\s+\d+><reset color>{Regex.Escape(file)}\({lineNumber}\): {subcategory} {expectedMessageType} {code}: {message} \(TaskId:\d+\){Environment.NewLine}<reset color>"); 674console.ToString().ShouldMatch($@"<cyan>\d\d:\d\d:\d\d\.\d\d\d\s+\d+><reset color><{expectedColor}>{Regex.Escape(file)}\({lineNumber}\): {subcategory} {expectedMessageType} {code}: {message}{Environment.NewLine}<reset color>"); 783sc.ToString().ShouldBe("<red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + "<reset color>"); 845sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 959sc.ToString().ShouldBe("<red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + "<reset color>"); 1020sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 1081sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 1098sc.ToString().ShouldBe($"msg{Environment.NewLine}"); 1315message = message.Replace("\r\n", "\n").Replace("\n", Environment.NewLine); 1357item1spec = Environment.NewLine + " spec" + Environment.NewLine; 1358item2spec = Environment.NewLine + " spec2" + Environment.NewLine; 1359item3spec = Environment.NewLine + " (spec;3" + Environment.NewLine; 1361item1type = "type" + Environment.NewLine; 1362item2type = "type2" + Environment.NewLine; 1363item3type = "type(3)" + Environment.NewLine;
ConsoleOutputAlignerTests.cs (34)
27output.ShouldBe(indent + input + Environment.NewLine); 39output.ShouldBe(input + Environment.NewLine); 52output.ShouldBe(input + Environment.NewLine); 64output.ShouldBe(input + Environment.NewLine); 76output.ShouldBe(input + Environment.NewLine); 89output.ShouldBe(indent + input + Environment.NewLine); 102output.ShouldBe(expected1stLine + Environment.NewLine + expected2ndLine + Environment.NewLine); 123output.ShouldBe(expected.Replace("\n", Environment.NewLine)); 137output.ShouldBe(expected1stLine + Environment.NewLine + expected2ndLine + Environment.NewLine); 146input = input.Replace("\n", Environment.NewLine); 151output.ShouldBe(input + Environment.NewLine); 168expected = expected.Replace("\n", Environment.NewLine) + Environment.NewLine; 183input = input.Replace("\n", Environment.NewLine); 188output.ShouldBe(input + Environment.NewLine); 206string expected = input.Replace("\r", "").Replace("\n", Environment.NewLine) + Environment.NewLine; 220input = input.Replace("\n", Environment.NewLine); 221expected = expected.Replace("\n", Environment.NewLine); 234input = input.Replace("\n", Environment.NewLine); 235expected = expected.Replace("\n", Environment.NewLine); 248input = input.Replace("\n", Environment.NewLine); 253output.ShouldBe(input + Environment.NewLine); 263input = input.Replace("\n", Environment.NewLine); 268output.ShouldBe((prefixAlreadyWritten ? string.Empty : prefix) + input + Environment.NewLine); 278input = input.Replace("\n", Environment.NewLine); 283output.ShouldBe((prefixAlreadyWritten ? string.Empty : prefix) + input + Environment.NewLine); 293input = input.Replace("\n", Environment.NewLine); 298string expected = (prefixAlreadyWritten ? string.Empty : prefix) + input + Environment.NewLine + 299prefix + "x" + Environment.NewLine; 369input = input.Replace("\n", Environment.NewLine); 370expected = expected.Replace("\n", Environment.NewLine);
Construction\SolutionFile_OldParser_Tests.cs (1)
2475string[] lines = solutionFileContent.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
Construction\SolutionProjectGenerator_Tests.cs (14)
48_originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 54Environment.SetEnvironmentVariable("VisualStudioVersion", _originalVisualStudioVersion); 299Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", "1"); 311Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", null); 458Environment.SetEnvironmentVariable("VisualStudioVersion", null); 502Environment.SetEnvironmentVariable("VisualStudioVersion", null); 543Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 661string previousLegacyEnvironmentVariable = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 665Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 710Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", previousLegacyEnvironmentVariable); 1107Assert.True(buildResult, String.Join(Environment.NewLine, logger.Errors.Select(beea => beea.Message))); 1984string oldValueForMSBuildEmitSolution = Environment.GetEnvironmentVariable("MSBuildEmitSolution"); 2017Environment.SetEnvironmentVariable("MSBuildEmitSolution", "1"); 2036Environment.SetEnvironmentVariable("MSBuildEmitSolution", oldValueForMSBuildEmitSolution);
Definition\Project_Internal_Tests.cs (12)
31string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 38Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 61Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 75string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 82Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 101Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 121string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 129Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 144Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 172string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 180Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 200Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue);
Definition\Toolset_Tests.cs (33)
186string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 190Environment.SetEnvironmentVariable("VisualStudioVersion", null); 202Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 214string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 218Environment.SetEnvironmentVariable("VisualStudioVersion", null); 232Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 239string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 243Environment.SetEnvironmentVariable("VisualStudioVersion", null); 257Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 264string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 268Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 279Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 286string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 290Environment.SetEnvironmentVariable("VisualStudioVersion", null); 304Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 311string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 315Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 332Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 339string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 343Environment.SetEnvironmentVariable("VisualStudioVersion", null); 354Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 361string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 365Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 373Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 380string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 384Environment.SetEnvironmentVariable("VisualStudioVersion", null); 395Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 402string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 406Environment.SetEnvironmentVariable("VisualStudioVersion", null); 420Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 427string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 431Environment.SetEnvironmentVariable("VisualStudioVersion", ObjectModelHelpers.CurrentVisualStudioVersion); 448Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Definition\ToolsVersion_Tests.cs (42)
292string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 293string oldTreatHigherToolsVersions = Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT"); 297Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", "1"); 298Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 322Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", oldTreatHigherToolsVersions); 323Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 331string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 335Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 359Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 367string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 371Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 394Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 427string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 428string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 432Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 433Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 456Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 457Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 536string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 540Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 563Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 575string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 579Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 602Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 614string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 615string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 619Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 620Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 644Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 645Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 686string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 690Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 715Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 770string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 771string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 775Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 776Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 800Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 801Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 883string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 887Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 911Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion);
Evaluation\Evaluator_Tests.cs (76)
584string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 587Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 602Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 626string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 631Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", null); 647Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 672string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 675Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 690Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 718string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 721Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 736Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 2460string backupMSBuildExtensionsPath = Environment.GetEnvironmentVariable(specialPropertyName); 2461string backupMSBuildExtensionsPath32 = Environment.GetEnvironmentVariable(specialPropertyName32); 2462string backupMagicSwitch = Environment.GetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH"); 2463string targetVar = Environment.GetEnvironmentVariable("Target"); 2464string numberVar = Environment.GetEnvironmentVariable("0env"); 2465string msbuildVar = Environment.GetEnvironmentVariable("msbuildtoolsversion"); 2471Environment.SetEnvironmentVariable(specialPropertyName, null); 2472Environment.SetEnvironmentVariable(specialPropertyName32, null); 2473Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", null); 2484Environment.SetEnvironmentVariable(specialPropertyName, backupMSBuildExtensionsPath); 2485Environment.SetEnvironmentVariable(specialPropertyName32, backupMSBuildExtensionsPath32); 2486Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", backupMagicSwitch); 2487Environment.SetEnvironmentVariable("Target", targetVar); 2488Environment.SetEnvironmentVariable("0env", numberVar); 2489Environment.SetEnvironmentVariable("msbuildtoolsversion", msbuildVar); 2501string backupMSBuildExtensionsPath = Environment.GetEnvironmentVariable("MSBuildExtensionsPath"); 2507Environment.SetEnvironmentVariable("MSBuildExtensionsPath", @"c:\foo\bar"); 2517Environment.SetEnvironmentVariable("MSBuildExtensionsPath", backupMSBuildExtensionsPath); 2581string originalMSBuildExtensionsPath32Value = Environment.GetEnvironmentVariable("MSBuildExtensionsPath32"); 2585Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", @"c:\devdiv\vscore\msbuild"); 2594Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", originalMSBuildExtensionsPath32Value); 2656string originalMSBuildExtensionsPath64Value = Environment.GetEnvironmentVariable("MSBuildExtensionsPath64"); 2660Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", @"c:\devdiv\vscore\msbuild"); 2669Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", originalMSBuildExtensionsPath64Value); 2695string expected = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 2698expected = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); 2713string originalLocalAppDataValue = Environment.GetEnvironmentVariable("LocalAppData"); 2717Environment.SetEnvironmentVariable("LocalAppData", @"c:\AppData\Local"); 2726Environment.SetEnvironmentVariable("LocalAppData", originalLocalAppDataValue); 3108string oldEnvironmentValue = Environment.GetEnvironmentVariable("EnvironmentProperty"); 3112Environment.SetEnvironmentVariable("EnvironmentProperty", "Bar;Baz"); 3148Environment.SetEnvironmentVariable("EnvironmentProperty", oldEnvironmentValue); 3863string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3866Environment.SetEnvironmentVariable("VisualStudioVersion", null); 3907Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3918string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3921Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCDE"); 3960Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3970string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3973Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4012Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4022string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4025Environment.SetEnvironmentVariable("VisualStudioVersion", "abcdef"); 4064Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4074string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4075string originalC = Environment.GetEnvironmentVariable("C"); 4076string originalD = Environment.GetEnvironmentVariable("D"); 4080Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4081Environment.SetEnvironmentVariable("C", "c4"); // not explosive :) 4082Environment.SetEnvironmentVariable("D", "d4"); 4124Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4125Environment.SetEnvironmentVariable("C", originalC); 4126Environment.SetEnvironmentVariable("D", originalD); 4136string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4140Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4187Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4197string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4201Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4245Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4346string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4352Environment.SetEnvironmentVariable("VisualStudioVersion", null); 4365Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Evaluation\Expander_Tests.cs (14)
1870Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 2288string expected = ("OS=" + Environment.GetEnvironmentVariable("OS")).ToUpperInvariant(); 2621string env = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS"); 2625Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2635Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env); 2650string env = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS"); 2654Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2666Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env); 2859Assert.Equal(System.Environment.GetFolderPath(Environment.SpecialFolder.System), result); 3825Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3849Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3873Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3897Assert.Equal(Environment.GetEnvironmentVariable(envVar), result);
FileUtilities_Tests.cs (2)
793string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "subfolder");
Instance\ProjectInstance_Internal_Tests.cs (12)
315string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 319Environment.SetEnvironmentVariable("VisualStudioVersion", null); 338Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 349string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 353Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCD"); 364Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 374string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 378Environment.SetEnvironmentVariable("VisualStudioVersion", null); 392Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 403string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 407Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 433Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
ProjectCache\ProjectCacheTests.cs (3)
438MaxNodeCount = Environment.ProcessorCount 447MaxNodeCount = Environment.ProcessorCount 764MaxNodeCount = Environment.ProcessorCount,
TestAssets\ExampleNetTask\ExampleTask\ExampleTask.cs (1)
26string[] args = Environment.GetCommandLineArgs();
WarningsAsMessagesAndErrors_Tests.cs (1)
262{(customProperties != null ? String.Join(Environment.NewLine, customProperties.Select(i => $"<{i.Key}>{i.Value}</{i.Key}>")) : "")}
XmakeAttributes_Tests.cs (2)
133string notCurrentArchitecture = Environment.Is64BitProcess ? XMakeAttributes.MSBuildArchitectureValues.x86 : XMakeAttributes.MSBuildArchitectureValues.x64; 148string notCurrentArchitecture = Environment.Is64BitProcess ? XMakeAttributes.MSBuildArchitectureValues.x86 : XMakeAttributes.MSBuildArchitectureValues.x64;
Microsoft.Build.Framework (79)
ChangeWaves.cs (1)
130string msbuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION");
Constants.cs (1)
134internal static readonly string[] EnvironmentNewLine = [Environment.NewLine];
EncodingUtilities.cs (3)
298if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Major >= 10) // UTF-8 is only officially supported on 10+. 320return string.Equals(Environment.GetEnvironmentVariable("DOTNET_CLI_FORCE_UTF8_ENCODING"), "true", StringComparison.OrdinalIgnoreCase); 333string? dotnetCliLanguage = Environment.GetEnvironmentVariable("DOTNET_CLI_UI_LANGUAGE");
EnvironmentUtilities.cs (1)
19Environment.Is64BitOperatingSystem;
FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
FileClassifier.cs (2)
122string? programFiles = Environment.GetEnvironmentVariable(programFilesEnv); 134string? dir = Environment.GetEnvironmentVariable("VSAPPIDDIR");
InternalErrorException.cs (3)
115if (Environment.GetEnvironmentVariable("MSBUILDLAUNCHDEBUGGER") != null) 122if (!RunningTests() && Environment.GetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER") == null 123&& Environment.GetEnvironmentVariable("_NTROOT") == null)
LazyFormattedBuildEventArgs.cs (1)
130argValue = $"Argument conversion to string failed{Environment.NewLine}{e}";
NativeMethods.cs (3)
494int numberOfCpus = Environment.ProcessorCount; 1124Version osVersion = Environment.OSVersion.Version; 1644acceptAnsiColorCodes = AnsiDetector.IsAnsiSupported(Environment.GetEnvironmentVariable("TERM"));
OperatingSystem.cs (1)
42Version current = Environment.OSVersion.Version;
Traits.cs (60)
32DebugScheduler = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGSCHEDULER")); 33DebugNodeCommunication = DebugEngine || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGCOMM")); 38internal readonly string? MSBuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION"); 41public readonly bool ForceAllTasksOutOfProcToTaskHost = Environment.GetEnvironmentVariable("MSBUILDFORCEALLTASKSOUTOFPROC") == "1"; 46public readonly bool UseLazyWildCardEvaluation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes")); 47public readonly bool LogExpandedWildcards = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGEXPANDEDWILDCARDS")); 48public readonly bool ThrowOnDriveEnumeratingWildcard = Environment.GetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD") == "1"; 53public readonly bool CacheFileExistence = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileExistence")); 55public readonly bool UseSimpleProjectRootElementCacheConcurrency = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildUseSimpleProjectRootElementCacheConcurrency")); 60public readonly bool MSBuildCacheFileEnumerations = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileEnumerations")); 62public readonly bool EnableAllPropertyFunctions = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1"; 67public readonly bool EnableRestoreFirst = Environment.GetEnvironmentVariable("MSBUILDENABLERESTOREFIRST") == "1"; 72public static readonly string? MSBuildNodeHandshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 77public readonly bool ForceEvaluateAsFullFramework = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildForceEvaluateAsFullFramework")); 90public readonly bool EmitSolutionMetaproj = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildEmitSolution")); 100public readonly bool SolutionBatchTargets = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildSolutionBatchTargets")); 105public readonly bool LogPropertyFunctionsRequiringReflection = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildLogPropertyFunctionsRequiringReflection")); 110public readonly bool LogAllAssemblyLoads = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLASSEMBLYLOADS")); 115public static bool LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")); 131public readonly bool EnableRarNode = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildRarNode")); 138public readonly bool DebugEngine = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugEngine")); 141public readonly bool DebugUnitTests = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugUnitTests")); 143public readonly bool InProcNodeDisabled = Environment.GetEnvironmentVariable("MSBUILDNOINPROCNODE") == "1"; 148public readonly bool ForceTaskFactoryOutOfProc = Environment.GetEnvironmentVariable("MSBUILDFORCEINLINETASKFACTORIESOUTOFPROC") == "1"; 165public readonly bool SlnParsingWithSolutionPersistenceOptIn = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILD_PARSE_SLN_WITH_SOLUTIONPERSISTENCE")); 178return int.TryParse(Environment.GetEnvironmentVariable(environmentVariable), out int result) 188return double.TryParse(Environment.GetEnvironmentVariable(environmentVariable), 198string? value = Environment.GetEnvironmentVariable(name); 210public readonly bool DoNotSendDeferredMessagesToBuildManager = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildDoNotSendDeferredMessagesToBuildManager")); 216public readonly bool DoNotExpandQualifiedMetadataInUpdateOperation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation")); 226public readonly bool AlwaysUseContentTimestamp = Environment.GetEnvironmentVariable("MSBUILDALWAYSCHECKCONTENTTIMESTAMP") == "1"; 232public readonly bool TruncateTaskInputs = Environment.GetEnvironmentVariable("MSBUILDTRUNCATETASKINPUTS") == "1"; 237public readonly bool DoNotTruncateConditions = Environment.GetEnvironmentVariable("MSBuildDoNotTruncateConditions") == "1"; 242public readonly bool AlwaysEvaluateDangerousGlobs = Environment.GetEnvironmentVariable("MSBuildAlwaysEvaluateDangerousGlobs") == "1"; 247public readonly bool AlwaysDoImmutableFilesUpToDateCheck = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEMODIFICATIONTIME") == "1"; 252public readonly bool CopyWithoutDelete = Environment.GetEnvironmentVariable("MSBUILDCOPYWITHOUTDELETE") == "1"; 269_logProjectImports = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGIMPORTS")); 286_logTaskInputs = Environment.GetEnvironmentVariable("MSBUILDLOGTASKINPUTS") == "1"; 305var variable = Environment.GetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION"); 325public readonly bool CacheAssemblyInformation = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHERARASSEMBLYINFORMATION") != "1"; 332public readonly bool UseSymlinkTimeInsteadOfTargetTime = Environment.GetEnvironmentVariable("MSBUILDUSESYMLINKTIMESTAMP") == "1"; 337public readonly bool ReuseTaskHostNodes = Environment.GetEnvironmentVariable("MSBUILDREUSETASKHOSTNODES") == "1"; 342public readonly bool IgnoreEmptyImports = Environment.GetEnvironmentVariable("MSBUILDIGNOREEMPTYIMPORTS") == "1"; 347public readonly bool IgnoreTreatAsLocalProperty = Environment.GetEnvironmentVariable("MSBUILDIGNORETREATASLOCALPROPERTY") != null; 352public readonly bool DebugEvaluation = Environment.GetEnvironmentVariable("MSBUILDDEBUGEVALUATION") != null; 357public readonly bool WarnOnUninitializedProperty = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY")); 365public readonly bool UseCaseSensitiveItemNames = Environment.GetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES") == "1"; 370public readonly bool DisableLongPaths = Environment.GetEnvironmentVariable("MSBUILDDISABLELONGPATHS") == "1"; 375public readonly bool DisableSdkResolutionCache = Environment.GetEnvironmentVariable("MSBUILDDISABLESDKCACHE") == "1"; 380public readonly bool TargetPathForRelatedFiles = Environment.GetEnvironmentVariable("MSBUILDTARGETPATHFORRELATEDFILES") == "1"; 385public readonly bool UseSingleLoadContext = Environment.GetEnvironmentVariable("MSBUILDSINGLELOADCONTEXT") == "1"; 390public readonly bool UseAutoRunWhenLaunchingProcessUnderCmd = Environment.GetEnvironmentVariable("MSBUILDUSERAUTORUNINCMD") == "1"; 395public readonly bool AvoidUnicodeWhenWritingToolTaskBatch = Environment.GetEnvironmentVariable("MSBUILDAVOIDUNICODE") == "1"; 400public readonly bool EnsureStdOutForChildNodesIsPrimaryStdout = Environment.GetEnvironmentVariable("MSBUILDENSURESTDOUTFORTASKPROCESSES") == "1"; 408public readonly bool UseMinimalResxParsingInCoreScenarios = Environment.GetEnvironmentVariable("MSBUILDUSEMINIMALRESX") == "1"; 416public readonly bool DoNotVersionBuildResult = Environment.GetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT") == "1"; 421public readonly bool DoNotLimitBuildCheckResultsNumber = Environment.GetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER") == "1"; 456var value = Environment.GetEnvironmentVariable(environmentVariable); 475var mode = Environment.GetEnvironmentVariable("MSBUILD_PROJECTINSTANCE_TRANSLATION_MODE"); 499var mode = Environment.GetEnvironmentVariable("MSBUILD_SDKREFERENCE_PROPERTY_EXPANSION_MODE");
Microsoft.Build.Framework.UnitTests (14)
AssemblyLoadBuildEventArgs_Tests.cs (2)
32int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildCanceledEventArgs_Tests.cs (2)
30int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildCheckTracingEventArgs_Tests.cs (2)
45int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildSubmissionStartedEventArgs_Tests.cs (2)
53int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
CustomEventArgSerialization_Tests.cs (2)
37private int _eventArgVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
GeneratedFileUsedEventArgs_Tests.cs (2)
27int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
WorkerNodeTelemetryEventArgs_Tests.cs (2)
36int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
Microsoft.Build.Tasks.CodeAnalysis (18)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
644string? libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
250.. Environment.GetEnvironmentVariables().Cast<System.Collections.DictionaryEntry>()
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
240private static readonly string[] s_separator = { Environment.NewLine };
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.Build.Tasks.CodeAnalysis.Sdk (18)
src\Compilers\Core\MSBuildTask\ManagedCompiler.cs (1)
644string? libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Core\MSBuildTask\ManagedToolTask.cs (1)
250.. Environment.GetEnvironmentVariables().Cast<System.Collections.DictionaryEntry>()
src\Compilers\Core\MSBuildTask\Vbc.cs (1)
240private static readonly string[] s_separator = { Environment.NewLine };
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.Build.Tasks.CodeAnalysis.UnitTests (17)
DotNetSdkTests.cs (3)
30var root3 = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); 31root3 ??= Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages");
MapSourceRootTests.cs (11)
269"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", path2)) + Environment.NewLine + 271"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", path1)) + Environment.NewLine, engine.Log); 330"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "SourceControl", "git", "tfvc")) + Environment.NewLine + 332"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "RevisionId", "RevId1", "RevId2")) + Environment.NewLine + 334"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "NestedRoot", "NR1A", "NR1B")) + Environment.NewLine + 336"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "ContainingRoot", path3, "CR")) + Environment.NewLine + 338"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "MappedPath", "MP1", "MP2")) + Environment.NewLine + 340"MapSourceRoots.ContainsDuplicate", "SourceRoot", path1, "SourceLinkUrl", "URL1", "URL2")) + Environment.NewLine, 378"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", @"c:\MyProjects\MyProject\")) + Environment.NewLine, engine.Log); 407"MapSourceRoots.NoSuchTopLevelSourceRoot", "SourceRoot.ContainingRoot", "SourceRoot", @"")) + Environment.NewLine, engine.Log); 441"MapSourceRoots.NoTopLevelSourceRoot", "SourceRoot", "DeterministicSourcePaths")) + Environment.NewLine, engine.Log);
TestUtilities\DotNetSdkTestBase.cs (3)
75var dotnetInstallDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR"); 78dotnetInstallDir = Environment.GetEnvironmentVariable("PATH")?.Split(Path.PathSeparator).FirstOrDefault(isMatchingDotNetInstance); 121{string.Join(Environment.NewLine + " ", expressions.SelectWithIndex((e, i) => $@"<_Value{i}>{e}</_Value{i}><_Value{i} Condition=""'$(_Value{i})' == ''"">{EmptyValueMarker}</_Value{i}>"))}
Microsoft.Build.Tasks.Core (87)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigCache.cs (1)
42if (Environment.GetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE") != null)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
118bool useCache = Environment.GetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE") == null;
AssemblyDependency\Node\OutOfProcRarNode.cs (1)
23: this(Environment.ProcessorCount)
AssemblyDependency\ResolveAssemblyReference.cs (2)
2240_logVerboseSearchResults = Environment.GetEnvironmentVariable("MSBUILDLOGVERBOSERARSEARCHRESULTS") != null; 2945string dumpFrameworkSubsetList = Environment.GetEnvironmentVariable("MSBUILDDUMPFRAMEWORKSUBSETLIST");
AssemblyFoldersEx.cs (1)
85bool is64bitOS = Environment.Is64BitOperatingSystem;
AssemblyFoldersFromConfig.cs (1)
44if (Environment.Is64BitOperatingSystem)
BootstrapperUtil\BootstrapperBuilder.cs (5)
35private static readonly bool s_logging = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSPLOG")); 520productsOrder.Append(p.ProductCode).Append(Environment.NewLine); 1979return str.Replace("%NEWLINE%", Environment.NewLine); 2204Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommunicationsUtilities.cs (3)
206string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT") ?? ""; 597IDictionary vars = Environment.GetEnvironmentVariables(); 957string environmentValue = Environment.GetEnvironmentVariable(environmentVariable);
Copy.cs (4)
117private static bool s_alwaysRetryCopy = Environment.GetEnvironmentVariable(AlwaysRetryEnvVar) != null; 122private static readonly bool s_forceSymlinks = Environment.GetEnvironmentVariable("MSBuildUseSymboliclinksIfPossible") != null; 237s_alwaysRetryCopy = Environment.GetEnvironmentVariable(AlwaysRetryEnvVar) != null; 447if (Environment.GetEnvironmentVariable(AlwaysOverwriteReadOnlyFilesEnvVar) != null)
DebugUtils.cs (5)
33string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 54Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 69return ScanNodeMode(Environment.CommandLine); 94var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 102$"{ProcessNodeMode.Value}_{EnvironmentUtilities.ProcessName}_PID={EnvironmentUtilities.CurrentProcessId}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
Exec.cs (1)
508return Environment.GetEnvironmentVariable("ComSpec");
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
GenerateApplicationManifest.cs (4)
224int t1 = Environment.TickCount; 243Util.WriteLog($"GenerateApplicationManifest.AddIsolatedComReferences t={Environment.TickCount - t1}"); 269int t1 = Environment.TickCount; 328Util.WriteLog($"GenerateApplicationManifest.AddClickOnceFiles t={Environment.TickCount - t1}");
GenerateManifestBase.cs (6)
424_startTime = Environment.TickCount; 511int t1 = Environment.TickCount; 521Util.WriteLog($"GenerateManifestBase.ResolveFiles t={Environment.TickCount - t1}"); 614int t1 = Environment.TickCount; 627Util.WriteLog($"GenerateManifestBase.WriteManifest t={Environment.TickCount - t1}"); 628Util.WriteLog($"Total time to generate manifest '{Path.GetFileName(OutputManifest.ItemSpec)}': t={Environment.TickCount - _startTime}");
ManifestUtil\ApplicationManifest.cs (4)
431int t1 = Environment.TickCount; 510Util.WriteLog($"GenerateManifest.CheckForComDuplicates t={Environment.TickCount - t1}"); 640int t1 = Environment.TickCount; 720Util.WriteLog($"GenerateManifest.CheckManifestReferences t={Environment.TickCount - t1}");
ManifestUtil\ComImporter.cs (1)
208if (Environment.Is64BitProcess)
ManifestUtil\EmbeddedManifestReader.cs (2)
74int t1 = Environment.TickCount; 76Util.WriteLog($"EmbeddedManifestReader.Read t={Environment.TickCount - t1}");
ManifestUtil\ManifestFormatter.cs (2)
17int t1 = Environment.TickCount; 99Util.WriteLog($"ManifestWriter.Format t={Environment.TickCount - t1}");
ManifestUtil\ManifestReader.cs (4)
177int t1 = Environment.TickCount; 219Util.WriteLog(String.Format(CultureInfo.InvariantCulture, "ManifestReader.ReadManifest t={0}", Environment.TickCount - t1)); 240int t1 = Environment.TickCount; 245Util.WriteLog($"ManifestReader.Deserialize t={Environment.TickCount - t1}");
ManifestUtil\ManifestWriter.cs (4)
28int t1 = Environment.TickCount; 30Util.WriteLog($"ManifestWriter.Serialize t={Environment.TickCount - t1}"); 94int t1 = Environment.TickCount; 190Util.WriteLog($"ManifestWriter.WriteManifest t={Environment.TickCount - t1}");
ManifestUtil\PathUtil.cs (1)
231$"{path.Substring(0, i)}{Environment.MachineName.ToLowerInvariant()}{path.Substring(i + localHost.Length)}" :
ManifestUtil\SecurityUtil.cs (3)
723Environment.GetFolderPath(Environment.SpecialFolder.Windows), 725Environment.Is64BitProcess ? "Framework64" : "Framework",
ManifestUtil\TrustInfo.cs (2)
702int t1 = Environment.TickCount; 792Util.WriteLog($"ManifestWriter.WriteTrustInfo t={Environment.TickCount - t1}");
ManifestUtil\Util.cs (5)
28internal static readonly string Schema = Environment.GetEnvironmentVariable("VSPSCHEMA"); 29internal static readonly bool logging = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSPLOG")); 117Version v = Environment.Version; 268string logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Microsoft\VisualStudio\8.0\VSPLOG");
ManifestUtil\XmlUtil.cs (10)
78int t1 = Environment.TickCount; 82int t2 = Environment.TickCount; 84Util.WriteLog($"new XPathDocument(1) t={Environment.TickCount - t2}"); 86int t3 = Environment.TickCount; 91Util.WriteLog($"XslCompiledTransform.Load t={Environment.TickCount - t3}"); 98int t4 = Environment.TickCount; 101Util.WriteLog($"new XmlReader(2) t={Environment.TickCount - t4}"); 122int t5 = Environment.TickCount; 124Util.WriteLog($"XslCompiledTransform.Transform t={Environment.TickCount - t4}"); 130Util.WriteLog($"XslCompiledTransform(\"{resource}\") t={Environment.TickCount - t1}");
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
712bool deleteSourceCodeFile = Environment.GetEnvironmentVariable("MSBUILDLOGCODETASKFACTORYOUTPUT") == null; 735string toolExe = Environment.GetEnvironmentVariable("CscToolExe"); 751string toolExe = Environment.GetEnvironmentVariable("VbcToolExe");
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
55_dotnetCliPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
Tracing.cs (2)
60string val = Environment.GetEnvironmentVariable("MSBUILDTRACEINTERVAL"); 121Trace.WriteLine(System.Environment.StackTrace);
Microsoft.Build.Tasks.UnitTests (95)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
179Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", "1"); 186Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", null);
Copy_Tests.cs (12)
105_alwaysOverwriteReadOnlyFiles = Environment.GetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar); 106_alwaysRetry = Environment.GetEnvironmentVariable(Copy.AlwaysRetryEnvVar); 108Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, null); 109Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, null); 119Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, _alwaysOverwriteReadOnlyFiles); 120Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, _alwaysRetry); 756string oldAlwaysOverwriteValue = Environment.GetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar); 760Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, "1 "); 804Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, oldAlwaysOverwriteValue); 822string oldAlwaysRetryValue = Environment.GetEnvironmentVariable(Copy.AlwaysRetryEnvVar); 826Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, "1 "); 873Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, oldAlwaysRetryValue);
Exec_Tests.cs (22)
281Environment.GetFolderPath(Environment.SpecialFolder.Windows); // not desktop etc - IT redirection messes it up 293string working = @"\\" + Environment.MachineName + @"\c$"; 301string system = Environment.GetFolderPath(Environment.SpecialFolder.System); 313Environment.GetFolderPath(Environment.SpecialFolder.Windows) : "/usr/lib"); 336string oldTmp = Environment.GetEnvironmentVariable("TMP"); 349Environment.SetEnvironmentVariable("TMP", newTmp); 357Environment.SetEnvironmentVariable("TMP", oldTmp); 373string oldTmp = Environment.GetEnvironmentVariable("TMP"); 386Environment.SetEnvironmentVariable("TMP", newTmp); 395Environment.SetEnvironmentVariable("TMP", oldTmp); 411string oldTmp = Environment.GetEnvironmentVariable("TMP"); 424Environment.SetEnvironmentVariable("TMP", newTmp); 432Environment.SetEnvironmentVariable("TMP", oldTmp); 448string oldTmp = Environment.GetEnvironmentVariable("TMP"); 461Environment.SetEnvironmentVariable("TMP", newTmp); 469Environment.SetEnvironmentVariable("TMP", oldTmp); 862string oldValue = Environment.GetEnvironmentVariable("errorlevel"); 867Environment.SetEnvironmentVariable("errorlevel", "1"); 874Environment.SetEnvironmentVariable("errorlevel", oldValue);
FormatUrl_Tests.cs (4)
77t.OutputUrl.ShouldBe(new Uri(Path.Combine(Environment.CurrentDirectory, t.InputUrl)).AbsoluteUri); 117t.InputUrl = Environment.CurrentDirectory; 134t.OutputUrl.ShouldBe(new Uri(Environment.CurrentDirectory).AbsoluteUri); 176t.OutputUrl.ShouldBe(@"https://" + Environment.MachineName.ToLowerInvariant() + "/Example/Path");
GetInstalledSDKLocations_Tests.cs (10)
273Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 274Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 307Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 308Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 320Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 321Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 381Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 382Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 394Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 455Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
HintPathResolver_Tests.cs (2)
54bool result = ResolveHintPath(Environment.NewLine + tempFile.Path + Environment.NewLine);
RegressionTests.cs (1)
80Assert.True(result, "Output:" + Environment.NewLine + logger.FullLog);
ResolveSDKReference_Tests.cs (20)
3765Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3766Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3834Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3835Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3906Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3907Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3977Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3978Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4028Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4029Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4086Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4087Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4133Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4134Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4185Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4186Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4272Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4273Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4317Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4318Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
RoslynCodeTaskFactory_Tests.cs (1)
903var dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
TaskFactoryUtilities_Tests.cs (1)
58var directories = new List<string> { Environment.CurrentDirectory };
WriteCodeFragment_Tests.cs (4)
550var multilineString = String.Join(Environment.NewLine, lines); 586var multilineString = String.Join(Environment.NewLine, lines); 1193string expectedContent = string.Join(Environment.NewLine, expectedHeader.Concat(expectedAttributes)); 1197Environment.NewLine,
XmlPoke_Tests.cs (16)
59nodes.ShouldNotBeNull($"There should be <variable /> elements with a Name attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 61nodes.Count.ShouldBe(3, $"There should be 3 <variable /> elements with a Name attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 63nodes.ShouldAllBe(i => i.Value.Equals("Mert"), $"All <variable /> elements should have Name=\"Mert\" {Environment.NewLine}{xmlDocument.OuterXml}"); 76nodes.ShouldNotBeNull($"There should be <variable /> elements with a Name attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 78nodes.Count.ShouldBe(3, $"There should be 3 <variable /> elements with a Name attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 80nodes.ShouldAllBe(i => i.Value.Equals(value), $"All <variable /> elements should have Name=\"{value}\" {Environment.NewLine}{xmlDocument.OuterXml}"); 93nodes.ShouldNotBeNull($"There should be <class /> elements with an AccessModifier attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 95nodes.Count.ShouldBe(1, $"There should be 1 <class /> element with an AccessModifier attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 110nodes.ShouldNotBeNull($"There should be <class /> elements {Environment.NewLine}{xmlDocument.OuterXml}"); 112nodes.Count.ShouldBe(1, $"There should be 1 <class /> element {Environment.NewLine}{xmlDocument.OuterXml}"); 116testNodes.ShouldNotBeNull($"There should be <class /> elements with one child Test element {Environment.NewLine}{xmlDocument.OuterXml}"); 118testNodes.Count.ShouldBe(1, $"There should be 1 <class /> element with one child Test element {Environment.NewLine}{xmlDocument.OuterXml}"); 134nodes.ShouldNotBeNull($"There should be <class /> element with an AccessModifier attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 136nodes.Count.ShouldBe(1, $"There should be 1 <class /> element with an AccessModifier attribute {Environment.NewLine}{xmlDocument.OuterXml}"); 304nodes.ShouldNotBeNull($"There should be <variable/> elements {Environment.NewLine}{xmlDocument.OuterXml}"); 306nodes.Count.ShouldBe(3, $"There should be 3 <variable/> elements {Environment.NewLine}{xmlDocument.OuterXml}");
Microsoft.Build.UnitTests.Shared (26)
EnvironmentProvider.cs (3)
114getEnvironmentVariable = Environment.GetEnvironmentVariable; 122getEnvironmentVariable ??= Environment.GetEnvironmentVariable; 132currentProcessPath = Environment.ProcessPath;
MockEngine.cs (2)
176string message = $"Received telemetry event '{eventName}'{Environment.NewLine}"; 179message += $" Property '{key}' = '{properties[key]}'{Environment.NewLine}";
RequiresSymbolicLinksFactAttribute.cs (1)
18bool.TryParse(Environment.GetEnvironmentVariable("TF_BUILD"), out bool value) && value;
RunnerUtilities.cs (1)
89var comSpec = Environment.GetEnvironmentVariable("ComSpec");
TestEnvironment.cs (19)
174() => Environment.GetEnvironmentVariable(environmentVariableName))); 464_initialEnvironment = Environment.GetEnvironmentVariables(); 469var environment = Environment.GetEnvironmentVariables(); 618Environment.SetEnvironmentVariable(key, tempPath); 630Environment.SetEnvironmentVariable(key, tempPaths[key]); 640[TMP] = Environment.GetEnvironmentVariable(TMP), 641[TEMP] = Environment.GetEnvironmentVariable(TEMP) 646tempPaths[TMPDIR] = Environment.GetEnvironmentVariable(TMPDIR); 698_previousDebugEngineEnv = Environment.GetEnvironmentVariable("MSBuildDebugEngine"); 699_previousDebugPath = Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 703Environment.SetEnvironmentVariable("MSBuildDebugEngine", "1"); 704Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", FileUtilities.TempFileDirectory); 708Environment.SetEnvironmentVariable("MSBuildDebugEngine", null); 709Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", null); 715Environment.SetEnvironmentVariable("MSBuildDebugEngine", _previousDebugEngineEnv); 716Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", _previousDebugPath); 812_originalValue = Environment.GetEnvironmentVariable(environmentVariableName); 814Environment.SetEnvironmentVariable(environmentVariableName, newValue); 821public override void Revert() => Environment.SetEnvironmentVariable(_environmentVariableName, _originalValue);
Microsoft.Build.Utilities.Core (43)
AssemblyFolders\AssemblyFoldersFromConfigInfo.cs (1)
37DirectoryPath = Environment.ExpandEnvironmentVariables(directoryPath);
AssemblyFoldersEx.cs (1)
85bool is64bitOS = Environment.Is64BitOperatingSystem;
AssemblyFoldersFromConfig.cs (1)
44if (Environment.Is64BitOperatingSystem)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommandLineBuilder.cs (1)
220CommandLine.Append(Environment.NewLine);
DebugUtils.cs (5)
33string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 54Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 69return ScanNodeMode(Environment.CommandLine); 94var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 102$"{ProcessNodeMode.Value}_{EnvironmentUtilities.ProcessName}_PID={EnvironmentUtilities.CurrentProcessId}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
FrameworkLocationHelper.cs (8)
138internal static readonly string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); 819string complusInstallRoot = Environment.GetEnvironmentVariable("COMPLUS_INSTALLROOT"); 820string complusVersion = Environment.GetEnvironmentVariable("COMPLUS_VERSION"); 914string programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 936programFilesX64 = Environment.GetEnvironmentVariable("ProgramW6432"); 954string combinedPath = Environment.GetEnvironmentVariable("ReferenceAssemblyRoot");
TaskLoggingHelper.cs (3)
1260message += Environment.NewLine + exception.StackTrace; 1625bool diagnostics = Environment.GetEnvironmentVariable("MSBUILDDIAGNOSTICS") != null; 1632message += Environment.NewLine + exception.StackTrace;
ToolLocationHelper.cs (9)
1625return Environment.GetFolderPath(Environment.SpecialFolder.System); 1828if (!Environment.Is64BitOperatingSystem || platformTarget.Equals("x86", StringComparison.OrdinalIgnoreCase) || platformTarget.Equals("arm", StringComparison.OrdinalIgnoreCase)) 2871bool is64bitOS = Environment.Is64BitOperatingSystem; 2899string userLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 2947string sdkDirectoryRootsFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY"); 2974string sdkDirectoryRootsFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDMULTIPLATFORMSDKREFERENCEDIRECTORY"); 2994string disableRegistryForSDKLookup = Environment.GetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP");
ToolTask.cs (4)
63private static readonly bool s_preserveTempFiles = string.Equals(Environment.GetEnvironmentVariable("MSBUILDPRESERVETOOLTEMPFILES"), "1", StringComparison.Ordinal); 1006string timeoutFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDTOOLTASKCANCELPROCESSWAITTIMEOUT"); 1319return Environment.GetEnvironmentVariable("PATH")? 1449$@"%SystemRoot%\System32\chcp.com {encoding.CodePage}>nul{Environment.NewLine}",
Tracing.cs (2)
60string val = Environment.GetEnvironmentVariable("MSBUILDTRACEINTERVAL"); 121Trace.WriteLine(System.Environment.StackTrace);
Microsoft.Build.Utilities.UnitTests (43)
MuxLogger_Tests.cs (2)
129mockLogger.FullLog.Replace(Environment.NewLine, "").ShouldBe(mockLogger2.FullLog.Replace(Environment.NewLine, ""));
ToolLocationHelper_Tests.cs (27)
661if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ProgramFiles(x86)"))) 1957Environment.SpecialFolder folder = Environment.Is64BitOperatingSystem ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles; 1958string programFilesX86 = Environment.GetFolderPath(folder); 2148if (!Environment.Is64BitOperatingSystem) 2169if (!Environment.Is64BitProcess) 2194if (!Environment.Is64BitOperatingSystem) 2239if (Environment.Is64BitOperatingSystem) 2277if (Environment.Is64BitOperatingSystem) 2990Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3015Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3027Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3061Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3479Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "True"); 3510Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3523Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "True"); 3536Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3568Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3569Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3600Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3601Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3642Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3670Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4054Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4083Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
ToolTask_Tests.cs (14)
40NativeMethodsShared.IsUnixLike ? "/bin" : Environment.GetFolderPath(Environment.SpecialFolder.System), 165string systemPath = NativeMethodsShared.IsUnixLike ? "/bin" : Environment.GetFolderPath(Environment.SpecialFolder.System); 274string pattern = $"{commandLine}{Environment.NewLine}\\s*{displayMessage}"; 383string systemPath = NativeMethodsShared.IsUnixLike ? "/bin" : Environment.GetFolderPath(Environment.SpecialFolder.System); 436string systemPath = NativeMethodsShared.IsUnixLike ? "/bin" : Environment.GetFolderPath(Environment.SpecialFolder.System); 563Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), 661env.SetEnvironmentVariable("PATH", $"{tempDirectory}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}"); 695expectedCmdPath = new[] { Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe").ToUpperInvariant() };
Microsoft.Cci.Extensions (2)
HostEnvironment.cs (1)
726string resolvedPath = Environment.ExpandEnvironmentVariables(path);
Writers\Syntax\TokenSyntaxWriter.cs (1)
58Write(Environment.NewLine);
Microsoft.CodeAnalysis (24)
Collections\CachingFactory.cs (1)
200Environment.ProcessorCount * 2);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
337private readonly int _workerCount = Environment.ProcessorCount;
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
1351Environment.FailFast(CreateAnalyzerExceptionDiagnostic(analyzer, ex, info).ToString()); 1405var contextInformation = string.Join(Environment.NewLine, CreateDiagnosticDescription(info, e), CreateDisablingMessage(analyzer, analyzerName)).Trim(); 1418return string.Join(Environment.NewLine,
DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (2)
34var programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
DiaSymReader\SymUnmanagedFactory.cs (1)
83foreach (var method in typeof(Environment).GetTypeInfo().GetDeclaredMethods("GetEnvironmentVariable"))
InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
InternalUtilities\TextKeyedCache.cs (1)
88Environment.ProcessorCount * 4);
Interop\ClrStrongName.cs (2)
39if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("COMPLUS_InstallRoot"))) 41var version = Environment.GetEnvironmentVariable("COMPLUS_Version");
RuleSet\RuleSetInclude.cs (1)
107includePath = Environment.ExpandEnvironmentVariables(includePath);
SourceGeneration\GeneratorDriver.cs (1)
344Environment.FailFast(CreateGeneratorExceptionDiagnostic(messageProvider, sourceGenerator, e, isInit).ToString());
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (2)
16private static readonly string s_separator = Environment.NewLine + "-----" + Environment.NewLine;
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Analyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.Analyzers.UnitTests (3)
MetaAnalyzers\ReleaseTrackingAnalyzerTests.cs (3)
566var diagnosticText = (shippedText.Length > 0 ? shippedText : unshippedText).Split([Environment.NewLine], StringSplitOptions.None).ElementAt(line - 1); 801var lineCount = (shippedText.Length > 0 ? shippedText : unshippedText).Split([Environment.NewLine], StringSplitOptions.None).Length; 832var lineCount = (shippedText.Length > 0 ? shippedText : unshippedText).Split([Environment.NewLine], StringSplitOptions.None).Length;
Microsoft.CodeAnalysis.AnalyzerUtilities (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.BannedApiAnalyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.CodeStyle (24)
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
122var eolLength = Environment.NewLine.Length;
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.CodeStyle.UnitTestUtilities (2)
src\Features\DiagnosticsTestUtilities\CodeActions\CSharpVerifierHelper.cs (2)
27var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory);
Microsoft.CodeAnalysis.Collections.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Contracts.Package (3)
ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.CodeAnalysis.CSharp (4)
Binder\Binder.cs (1)
956var lines = scope.ScopeDesignator.ToString().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
CommandLine\CSharpCommandLineParser.cs (1)
296Console.WriteLine($"Compiler started with process ID {Environment.ProcessId}");
Utilities\EnvironmentExtensions.cs (2)
11extension(Environment) 18return Environment.ProcessId;
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
91var newLine = Environment.NewLine;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (2)
81return elementNode.WithTrailingTrivia(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine)); 85SyntaxFactory.ParseLeadingTrivia(Environment.NewLine)
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (6)
src\Analyzers\CSharp\Tests\Formatting\FormattingAnalyzerTests.cs (6)
22"class X[| |]" + Environment.NewLine + 23"{" + Environment.NewLine + 24"}" + Environment.NewLine; 26"class X" + Environment.NewLine + 27"{" + Environment.NewLine + 28"}" + Environment.NewLine;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (15)
CommandLineTests.cs (14)
4802Assert.True(match.Success, $"Expected pattern:{Environment.NewLine}{pattern}{Environment.NewLine}Actual:{Environment.NewLine}{output}"); 6007.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6042.Replace(Environment.NewLine, string.Empty), workingDirectory: tempDir) : 6122.Replace(Environment.NewLine, string.Empty)) : 8223var errorLines = outWriter.ToString().Trim().Split(new string[] { Environment.NewLine }, StringSplitOptions.None); 8236errorLines = outWriter.ToString().Trim().Split(new string[] { Environment.NewLine }, StringSplitOptions.None); 9004Assert.Contains($"error CS0016: Could not write to output file '{exePath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9027Assert.Contains($"error CS0016: Could not write to output file '{pdbPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9049Assert.Equal($"error CS0016: Could not write to output file '{xmlPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9079Assert.Equal($"error CS0016: Could not write to output file '{sourceLinkPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 10595expectedExitCode, exitCode, Environment.NewLine, Environment.NewLine, output));
TouchedFileLoggingTests.cs (1)
24private static readonly string s_libDirectory = Environment.GetEnvironmentVariable("LIB");
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (12)
AutomaticCompletion\AutomaticBraceCompletionTests.cs (1)
1374buffer.Insert(10, Environment.NewLine);
Completion\ArgumentProviders\ArgumentProviderOrderTests.cs (2)
47string.Join(Environment.NewLine, expectedOrder.Select(x => x.FullName)), 48string.Join(Environment.NewLine, actualOrder.Select(x => x.FullName)));
Completion\CompletionProviders\AwaitCompletionProviderTests.cs (1)
827var data = (n$$) {{(hasNewline ? Environment.NewLine : string.Empty)}} M();
Completion\CompletionProviders\CompletionProviderOrderTests.cs (2)
85string.Join(Environment.NewLine, expectedOrder.Select(x => x.FullName)), 86string.Join(Environment.NewLine, actualOrder.Select(x => x.FullName)));
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (1)
500var data = (n$$) {{(hasNewline ? Environment.NewLine : string.Empty)}} M();
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
85var systemDir = Path.GetFullPath(Environment.SystemDirectory);
Completion\CompletionProviders\SnippetCompletionProviderTests.cs (2)
41=> await VerifyItemExistsAsync(@"$$", MockSnippetInfoService.SnippetShortcut, MockSnippetInfoService.SnippetTitle + Environment.NewLine + MockSnippetInfoService.SnippetDescription + Environment.NewLine + string.Format(FeaturesResources.Note_colon_Tab_twice_to_insert_the_0_snippet, MockSnippetInfoService.SnippetShortcut), SourceCodeKind.Regular);
Debugging\ProximityExpressionsGetterTests.cs (1)
99{{string.Join(Environment.NewLine, body.ReplaceLineEndings("\n").Split('\n').Select(line => line == "" ? line : $" {line}"))}}
Formatting\FormattingEngineTests.cs (1)
1548var endOfFile = trailingNewLine ? Environment.NewLine : "";
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (15)
CodeGen\CodeGenAsyncLocalsTests.cs (3)
36var actualLines = c.VisualizeIL(qualifiedMethodName).Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 38return string.Join(Environment.NewLine, 41select pair.line1.Trim() + Environment.NewLine + pair.line2.Trim());
CodeGen\CodeGenAsyncSpillTests.cs (1)
10191var expectedOutput = new bool[] { false, true, false, true, false }.Aggregate("", (str, next) => str += $"{next}{Environment.NewLine}");
CodeGen\CodeGenClosureLambdaTests.cs (5)
1461CompileAndVerify(source, expectedOutput: $"this: D::F{Environment.NewLine}base: B1::F"); 1520CompileAndVerify(source, expectedOutput: $"this: D::F{Environment.NewLine}base: B1::F"); 1694CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F"); 1747CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F"); 1802CompileAndVerify(source, expectedOutput: $"D::F{Environment.NewLine}B1::F");
CodeGen\CodeGenLocalFunctionTests.cs (2)
4728VerifyOutput(src, $"10{Environment.NewLine}4", TestOptions.ReleaseExe.WithAllowUnsafe(true), verify: Verification.Fails); 6356var usingBlock = string.Join(Environment.NewLine, usings);
CodeGen\CodeGenTests.cs (3)
2619CompileAndVerify(source, expectedOutput: $"A.P.get;B.P.set;A.P.get;B.P.set;{Environment.NewLine}A.P.get;B.P.set;D.P.get;B.P.set;"). 2790CompileAndVerify(source, expectedOutput: $"A.P.get;C.P.set;C.P.get;B.P.set;{Environment.NewLine}A.P.get;B.P.set;D.P.get;B.P.set;"). 2961CompileAndVerify(source, expectedOutput: $"B.P.get;C.P.set;C.P.get;B.P.set;{Environment.NewLine}B.P.get;D.P.set;D.P.get;B.P.set;").
Emit\DynamicAnalysis\DynamicInstrumentationTests.cs (1)
4123Assert.True(expected == instrumented, $"Method '{qualifiedMethodName}' should {(expected ? "be" : "not be")} instrumented. Actual IL:{Environment.NewLine}{il}");
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (6)
Emit\LocalStateTracing\LocalStateTracingTests.cs (3)
198verify: s_verification with { ILVerifyMessage = ilVerifyMessage + Environment.NewLine + s_verification.ILVerifyMessage }, 221$"Method '{qualifiedMethodName}' should {(expected ? "be" : "not be")} instrumented. Actual IL:{Environment.NewLine}{il}"); 377ILVerifyMessage = s_verification.ILVerifyMessage + Environment.NewLine + """
Emit\RuntimeProbing\ModuleCancellationTests.cs (1)
40$"Method '{qualifiedMethodName}' should not be instrumented with '{instrumentationIndicator}'. Actual IL:{Environment.NewLine}{il}");
Emit\RuntimeProbing\StackOverflowProbingTests.cs (1)
33$"Method '{qualifiedMethodName}' should not be instrumented. Actual IL:{Environment.NewLine}{il}");
PDB\PDBTests.cs (1)
435.Join(Environment.NewLine);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (4)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1407if (Environment.ProcessorCount <= 1)
RefReadonlyParameterTests.cs (2)
7823CreateCompilation(source2 + Environment.NewLine + source3, new[] { comp1Ref }, parseOptions: TestOptions.Regular11).VerifyDiagnostics( 8615CreateCompilation(source2 + Environment.NewLine + source3, new[] { comp1Ref }, parseOptions: TestOptions.Regular11).VerifyDiagnostics(
Semantics\ExtensionTests2.cs (1)
25689var escapedNewline = Environment.NewLine switch
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (2)
EndToEndTests.cs (2)
358var source = string.Join(Environment.NewLine, declarations); 402var source = string.Join(Environment.NewLine, declarations);
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
193description: (snippet.Title + Environment.NewLine + snippet.Description).ToSymbolDisplayParts(),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
592[EndOfLine(Environment.NewLine)]),
Snippets\CSharpSnippetFunctionService.cs (1)
54var str = "case " + fullyQualifiedTypeName + "." + firstEnumMemberName + ":" + Environment.NewLine + " break;";
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpAddDocCommentNodesCodeFixProvider.cs (2)
81return elementNode.WithTrailingTrivia(SyntaxFactory.ParseTrailingTrivia(Environment.NewLine)); 85SyntaxFactory.ParseLeadingTrivia(Environment.NewLine)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (10)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (1)
441Message = $"The generated implementation isn't a valid method or property:{Environment.NewLine}{replacement}",
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (3)
61$"{Environment.NewLine}Expected span: '{expectedText}' {expected}" + 62$"{Environment.NewLine}Actual span: '{actualText}' {actual}"); 767.Select(d => $"{d.Id}: {d.GetMessage().Split([Environment.NewLine], StringSplitOptions.None).First()}"));
src\Analyzers\CSharp\Tests\Formatting\FormattingAnalyzerTests.cs (6)
22"class X[| |]" + Environment.NewLine + 23"{" + Environment.NewLine + 24"}" + Environment.NewLine; 26"class X" + Environment.NewLine + 27"{" + Environment.NewLine + 28"}" + Environment.NewLine;
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
107Assert.Equal(Environment.Version, s.Result.ReturnValue);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (8)
InteractiveSessionTests.cs (4)
417Assert.Equal(Environment.ProcessorCount, result); 457Assert.Equal(Environment.ProcessorCount, script.EvaluateAsync().Result); 466Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue); 469Assert.Equal(Environment.ProcessorCount, state.Result.ReturnValue);
ObjectFormatterTests.cs (4)
374Assert.Equal($"LongMembers {{{Environment.NewLine} LongName0123456789...{Environment.NewLine} LongValue: \"012345...{Environment.NewLine}}}{Environment.NewLine}", str);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (22)
Semantics\ConstantTests.cs (7)
1459var result = string.Join(Environment.NewLine, constants); 2995var source = string.Join(Environment.NewLine, range.Select(i => 3025var source = string.Join(Environment.NewLine, range.Select(i => 3082var source = string.Join(Environment.NewLine, range.Select(i => 3112var source = string.Join(Environment.NewLine, range.Select(i => 3172var source = string.Join(Environment.NewLine, range.Select(i => 3205var source = string.Join(Environment.NewLine, range.Select(i =>
Semantics\GenericConstraintsTests.cs (1)
2523options: TestOptions.UnsafeReleaseExe, verify: Verification.Fails, expectedOutput: string.Join(Environment.NewLine, type, size)).VerifyIL("Test.M<T>", @"
Semantics\MethodBodyModelTests.cs (1)
797Assert.Equal(string.Empty, string.Join(Environment.NewLine, comp.GetDiagnostics()));
Semantics\OperatorTests.cs (5)
3212.Split(new[] { Environment.NewLine }, System.StringSplitOptions.RemoveEmptyEntries) 11791CompileAndVerify(source: source, expectedOutput: "abcdef" + Environment.NewLine + "abcdef" + Environment.NewLine + "abcdef"); 11842CompileAndVerify(source: source, expectedOutput: "3" + Environment.NewLine + "3" + Environment.NewLine);
Semantics\OverloadResolutionTestBase.cs (1)
48.Split(new[] { Environment.NewLine }, System.StringSplitOptions.RemoveEmptyEntries)
Semantics\UnsafeTests.cs (3)
28if (Environment.NewLine == "\n") 32else if (Environment.NewLine == "\r\n") 5213var actual = string.Join(Environment.NewLine, builder);
SourceGeneration\GeneratorDriverTests.cs (4)
1256source = source.Replace(Environment.NewLine, "\r\n"); 1347source = source.Replace(Environment.NewLine, "\r\n"); 2171spc.AddSource("InvokedMethods.g.cs", string.Join(Environment.NewLine, 4272var expectedDetails = $"System.{typeName}: {message}{Environment.NewLine} ";
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Symbols\AnonymousTypesSemanticsTests.cs (1)
2141foreach (var line in source.Split(new String[] { Environment.NewLine }, StringSplitOptions.None))
Symbols\Source\CompletionTests.cs (1)
123Parallel.For(0, Math.Max(1, Environment.ProcessorCount - 1), t =>
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (85)
Diagnostics\LocationsTests.cs (1)
239AssertMappedSpanEqual(syntaxTree, $"System;{Environment.NewLine}class X", "c:\\goo.cs", 0, 6, 1, 7, hasMappedPath: false);
LexicalAndXml\DocumentationCommentLexerTestBase.cs (1)
70Console.WriteLine(string.Join("," + Environment.NewLine, baseline));
LexicalAndXml\PreprocessorTests.cs (10)
2104Assert.Equal($"#region A//B{Environment.NewLine}", regionDirective.ToFullString()); 2126Assert.Equal($"#region A/\\B{Environment.NewLine}", regionDirective.ToFullString()); 2214Assert.Equal($"#region \"{Environment.NewLine}", regionDirective.ToFullString()); 2235Assert.Equal($"#region \" {Environment.NewLine}", regionDirective.ToFullString()); 2256Assert.Equal($"#region \"goo\"{Environment.NewLine}", regionDirective.ToFullString()); 2277Assert.Equal($"#region \"goo\" {Environment.NewLine}", regionDirective.ToFullString()); 2298Assert.Equal($"#region \"\"{Environment.NewLine}", regionDirective.ToFullString()); 2319Assert.Equal($"#region \"\" {Environment.NewLine}", regionDirective.ToFullString()); 2340Assert.Equal($"#region \"\"\"{Environment.NewLine}", regionDirective.ToFullString()); 2361Assert.Equal($"#region \"\"\" {Environment.NewLine}", regionDirective.ToFullString());
LexicalAndXml\XmlDocCommentTests.cs (67)
153Assert.Equal($"/// <goo />{Environment.NewLine}", node.ToFullString()); 328Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString()); 346Assert.Equal($"/// <goo {Environment.NewLine}/// />{Environment.NewLine}", node.ToFullString()); 352Assert.Equal($"<goo {Environment.NewLine}/// />", doc.Content[1].ToFullString()); 377Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString()); 397Assert.Equal($"/** <goo {Environment.NewLine} * />{Environment.NewLine} */", node.ToFullString()); 403Assert.Equal($"<goo {Environment.NewLine} * />", doc.Content[1].ToFullString()); 771Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[0].ToString()); 773Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[2].ToString()); 805Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[0].ToString()); 807Assert.Equal(Environment.NewLine, textsyntax.ChildNodesAndTokens()[2].ToString()); 835Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 837Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 866Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 868Assert.Equal(Environment.NewLine, cdata.TextTokens[3].ToString()); 910Assert.Equal($"/// <![CDATA[ incomplete{Environment.NewLine}", node.ToFullString()); 920Assert.Equal(Environment.NewLine, cdata.TextTokens[1].ToString()); 997Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 999Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1028Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1030Assert.Equal(Environment.NewLine, comment.TextTokens[3].ToString()); 1072Assert.Equal($"/// <!-- incomplete{Environment.NewLine}", node.ToFullString()); 1082Assert.Equal(Environment.NewLine, comment.TextTokens[1].ToString()); 1135Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1137Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1169Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[1].ToString()); 1171Assert.Equal(Environment.NewLine, ProcessingInstruction.TextTokens[3].ToString()); 1655Assert.Equal(Environment.NewLine, xmltext.ChildNodesAndTokens()[0].ToString()); 1661Assert.Equal(Environment.NewLine, xmltext.ChildNodesAndTokens()[2].ToString()); 2398Assert.Equal($"///</Goo>{Environment.NewLine}", xmlText.TextTokens.ToFullString()); 2950SyntaxFactory.XmlNewLine(Environment.NewLine), 2955SyntaxFactory.XmlNewLine(Environment.NewLine)), 2956SyntaxFactory.XmlNewLine(Environment.NewLine), 2958SyntaxFactory.XmlNewLine(Environment.NewLine), 2977SyntaxFactory.XmlNewLine(Environment.NewLine), 2979SyntaxFactory.XmlNewLine(Environment.NewLine))); 2997SyntaxFactory.XmlNewLine(Environment.NewLine), 3005SyntaxFactory.XmlNewLine(Environment.NewLine))); 3041SyntaxFactory.XmlNewLine(Environment.NewLine), 3043SyntaxFactory.XmlNewLine(Environment.NewLine)), 3044SyntaxFactory.XmlNewLine(Environment.NewLine), 3045SyntaxFactory.XmlNewLine(Environment.NewLine), 3046SyntaxFactory.XmlNewLine(Environment.NewLine), 3048SyntaxFactory.XmlNewLine(Environment.NewLine), 3049SyntaxFactory.XmlNewLine(Environment.NewLine))); 3069SyntaxFactory.XmlNewLine(Environment.NewLine), 3071SyntaxFactory.XmlNewLine(Environment.NewLine)), 3072SyntaxFactory.XmlNewLine(Environment.NewLine), 3074SyntaxFactory.XmlNewLine(Environment.NewLine), 3096SyntaxFactory.XmlNewLine(Environment.NewLine), 3097SyntaxFactory.XmlNewLine(Environment.NewLine)), 3098SyntaxFactory.XmlNewLine(Environment.NewLine), 3100SyntaxFactory.XmlNewLine(Environment.NewLine), 3102SyntaxFactory.XmlNewLine(Environment.NewLine))); 3123SyntaxFactory.XmlNewLine(Environment.NewLine), 3124SyntaxFactory.XmlNewLine(Environment.NewLine)), 3125SyntaxFactory.XmlNewLine(Environment.NewLine), 3127SyntaxFactory.XmlNewLine(Environment.NewLine), 3131SyntaxFactory.XmlNewLine(Environment.NewLine))); 3150SyntaxFactory.XmlNewLine(Environment.NewLine), 3151SyntaxFactory.XmlNewLine(Environment.NewLine)), 3152SyntaxFactory.XmlNewLine(Environment.NewLine), 3175SyntaxFactory.XmlNewLine(Environment.NewLine), 3176SyntaxFactory.XmlNewLine(Environment.NewLine)), 3177SyntaxFactory.XmlNewLine(Environment.NewLine),
Syntax\SyntaxNormalizerTests.cs (6)
3864$" ///<summary>{Environment.NewLine}" + 3865$" /// A documentation comment{Environment.NewLine}" + 3866$" ///</summary>{Environment.NewLine}" + 3892$" /// <summary>{Environment.NewLine}" + 3893$" /// A documentation comment{Environment.NewLine}" + 3894$" /// </summary>{Environment.NewLine}" +
Microsoft.CodeAnalysis.CSharp.Test.Utilities (3)
DiagnosticTestUtilities.cs (2)
110Environment.NewLine, 111actualLength == 0 ? "<none>" : string.Join(Environment.NewLine, actualErrors)));
MockCSharpCompiler.cs (1)
33: base(CSharpCommandLineParser.Default, responseFile, args, buildPaths, Environment.GetEnvironmentVariable("LIB"), loader ?? new AnalyzerAssemblyLoader(), driverCache)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
91var newLine = Environment.NewLine;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (5)
Formatting\FormattingTests.cs (2)
9376var lines = s.Split([Environment.NewLine], StringSplitOptions.None); 9385return string.Join(Environment.NewLine, lines);
Formatting\FormattingTriviaTests.cs (1)
1608var newLine = Environment.NewLine;
OrganizeImports\OrganizeUsingsTests.cs (2)
30var document = project.AddDocument("Document", initial.ReplaceLineEndings(endOfLine ?? Environment.NewLine)); 42Assert.Equal(final.ReplaceLineEndings(endOfLine ?? Environment.NewLine), newRoot.ToFullString());
Microsoft.CodeAnalysis.Debugging.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.EditorFeatures (11)
ExtractMethod\ExtractMethodCommandHandler.cs (6)
237EditorFeaturesResources.Extract_method_encountered_the_following_issues + Environment.NewLine + 238string.Join("", result.Reasons.Select(r => Environment.NewLine + " " + r)), 251EditorFeaturesResources.Extract_method_encountered_the_following_issues + Environment.NewLine + 252string.Join("", result.Reasons.Select(r => Environment.NewLine + " " + r)) + Environment.NewLine + Environment.NewLine +
Preview\AbstractPreviewFactoryService.cs (1)
448: string.Join(Environment.NewLine, conflictDescriptions.Concat(warningDescriptions));
Preview\DifferenceViewerPreview.cs (1)
84if (Environment.HasShutdownStarted)
Shared\Utilities\ResettableDelay.cs (2)
53_lastSetTime = Environment.TickCount; 69while (Environment.TickCount - _lastSetTime < _delayInMilliseconds);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ReferenceCounting.cs (1)
20if (!Environment.HasShutdownStarted)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (2)
78Type(session, Environment.NewLine); 101Type(session, Environment.NewLine);
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (2)
44string.Join(Environment.NewLine, expectedSpans), 45string.Join(Environment.NewLine, actualSpans));
QuickInfo\AbstractQuickInfoSourceTests.cs (1)
23return string.Concat(System.Environment.NewLine, formattedCode);
Threading\StaTaskScheduler.cs (1)
25public bool IsRunningInScheduler => StaThread.ManagedThreadId == Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
CodeFixes\CodeFixServiceTests.cs (2)
600=> exception.Message + Environment.NewLine + exception.StackTrace; 1048code = Environment.NewLine + code;
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (5)
98expectedLines = expected.Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries); 741Environment.NewLine + 742string.Join(Environment.NewLine, baseline.Select(Inspect))); 755Environment.NewLine + 756string.Join(Environment.NewLine, extraEntitiesBuilder.Select(Inspect)));
Structure\AbstractStructureTaggerProviderTests.cs (1)
19var buffer = EditorFactory.CreateBuffer(exportProvider, input.Split([Environment.NewLine], StringSplitOptions.None));
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
347$"EE: AppDomain {appDomain.Id}, blocks {context.MetadataBlocks.Length}, contexts {context.AssemblyContexts.Count}" + Environment.NewLine,
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (6)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (10)
Debugger\Engine\DkmClrType.cs (1)
343var vsVersion = System.Environment.GetEnvironmentVariable("VisualStudioVersion") ?? "14.0";
Debugger\Engine\DkmClrValue.cs (3)
94var intPtr = Environment.Is64BitProcess ? new IntPtr((long)RawValue) : new IntPtr((int)RawValue); 550if (Environment.Is64BitProcess) 767? (Environment.Is64BitProcess ? typeof(long) : typeof(int))
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Extensions.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.ExternalAccess.Copilot (1)
Internal\SemanticSearch\CopilotSemanticSearchQueryExecutor.cs (1)
48RuntimeException ??= $"{exception.TypeName.ToVisibleDisplayString(includeLeftToRightMarker: false)}: {exception.Message}{Environment.NewLine}{exception.StackTrace.ToVisibleDisplayString(includeLeftToRightMarker: false)}";
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Options\OmniSharpLineFormattingOptions.cs (1)
14public string NewLine { get; init; } = Environment.NewLine;
Microsoft.CodeAnalysis.ExternalAccess.Xaml (1)
External\ConversionHelpers.cs (1)
25.SelectMany(section => section.TaggedParts.Add(new TaggedText(TextTags.LineBreak, Environment.NewLine)))
Microsoft.CodeAnalysis.Features (14)
Completion\CommonCompletionProvider.cs (1)
92parts = parts.Add(new TaggedText(TextTags.LineBreak, Environment.NewLine));
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (1)
95description: (snippetData.Description + Environment.NewLine + string.Format(FeaturesResources.Code_snippet_for_0, snippetData.Description)).ToSymbolDisplayParts(),
Diagnostics\Service\DiagnosticAnalyzerService_ComputeDiagnosticAnalysisResults.cs (1)
51=> $"project: ({project.Id}), ({string.Join(Environment.NewLine, analyzers.Select(a => a.ToString()))})";
EditAndContinue\EditAndContinueService.cs (1)
80var path = Environment.GetEnvironmentVariable("Microsoft_CodeAnalysis_EditAndContinue_LogDir");
ExternalAccess\UnitTesting\Notification\AbstractGlobalOperationNotificationService.cs (1)
41if (!Environment.HasShutdownStarted)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingLowPriorityProcessor.cs (1)
102Logger.Log(FunctionId.WorkCoordinator_Project_Enqueue, s_enqueueLogger, Environment.TickCount, item.ProjectId, !added);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingNormalPriorityProcessor.cs (1)
69Logger.Log(FunctionId.WorkCoordinator_DocumentWorker_Enqueue, s_enqueueLogger, Environment.TickCount, item.DocumentId, !added);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (2)
263Logger.Log(FunctionId.WorkCoordinator_SemanticChange_Enqueue, s_enqueueLogger, Environment.TickCount, documentId, changedMember != null); 379Logger.Log(FunctionId.WorkCoordinator_Project_Enqueue, s_enqueueLogger, Environment.TickCount, projectId);
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
289var documentTooltip = navigateDocument.FilePath + Environment.NewLine + dllPath;
SemanticSearch\SearchExceptionDefinitionItem.cs (1)
27new TaggedText(TextTags.Space, Environment.NewLine),
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
122var eolLength = Environment.NewLine.Length;
src\Compilers\Core\AnalyzerDriver\AnalyzerExceptionDescriptionBuilder.cs (2)
16private static readonly string s_separator = Environment.NewLine + "-----" + Environment.NewLine;
Microsoft.CodeAnalysis.Features.Test.Utilities (8)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
88src = src[..start] + string.Join("", Enumerable.Repeat(Environment.NewLine, lineCount)) + src[end..];
EditAndContinue\EditAndContinueTestVerifier.cs (1)
452throw new Exception($"Unable to find node with span {span} `{root.GetText().GetSubText(span)}` in:{Environment.NewLine}{root}");
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (2)
82=> CreateText("[*.*]" + Environment.NewLine + string.Join(Environment.NewLine, analyzerConfig.Select(c => $"{c.key} = {c.value}")));
EditAndContinue\Extensions.cs (2)
103=> "[*.*]" + Environment.NewLine + string.Join(Environment.NewLine, config.Select(c => $"{c.key} = {c.value}"));
EditAndContinue\RudeEditDiagnosticDescription.cs (2)
58"""{Environment.NewLine}{_squiggle}{Environment.NewLine}"""
Microsoft.CodeAnalysis.Features.UnitTests (2)
FindUsages\DefinitionItemFactoryTests.cs (2)
75itemSeparator: "," + Environment.NewLine, 125=> propertyName == null ? null : $"{Environment.NewLine}{nameof(DefinitionItem)}.{propertyName} does not match expected value.";
Microsoft.CodeAnalysis.InteractiveHost (20)
Interactive\Core\InteractiveHost.Service.cs (6)
111FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.Windows)), 112FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)), 113FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)),
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.LanguageServer (17)
DotnetCliHelper.cs (1)
136var path = Environment.GetEnvironmentVariable("PATH") ?? "";
FileBasedPrograms\VirtualProjectXmlProvider.cs (3)
189: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 206var targetFramework = Environment.GetEnvironmentVariable("DOTNET_RUN_FILE_TFM") ?? "net$(BundledNETCoreAppTargetFrameworkVersion)";
HostWorkspace\ProjectDependencyHelper.cs (2)
100+ Environment.NewLine 101+ string.Join(Environment.NewLine, unresolved.Select(r => $" {r.Name}-{r.VersionRange}"));
LanguageServer\Handler\Restore\RestoreHandler.cs (1)
49progress.Report(new RestorePartialResult(LanguageServerResources.Restore, $"{LanguageServerResources.Restore_complete}{Environment.NewLine}"));
Program.cs (1)
79logger.LogInformation("Server started with process ID {processId}", Environment.ProcessId);
Testing\RunTestsHandler.cs (2)
52var dotnetRootUser = Environment.GetEnvironmentVariable("DOTNET_ROOT_USER"); 182_logger.LogTrace($".runsettings:{Environment.NewLine}{contents}");
Testing\TestDiscoverer.cs (2)
42var partialResult = new RunTestsPartialResult(LanguageServerResources.Discovering_tests, $"{Environment.NewLine}{LanguageServerResources.Starting_test_discovery}", Progress: null); 84_logger.LogDebug(message: $"Potential test methods in range: {string.Join(Environment.NewLine, potentialTestMethods)}");
Testing\TestRunner.cs (1)
42progress.Report(new RunTestsPartialResult(LanguageServerResources.Running_tests, $"{Environment.NewLine}{LanguageServerResources.Starting_test_run}", initialProgress));
Testing\TestRunner.TestRunHandler.cs (4)
75message = @$"==== {LanguageServerResources.Summary} ===={Environment.NewLine}{state} - {string.Format(LanguageServerResources.Failed_0_Passed_1_Skipped_2_Total_3_Duration_4, stats?.TestsFailed, stats?.TestsPassed, stats?.TestsSkipped, stats?.TotalTests, RunTestsHandler.GetShortTimespan(testRunCompleteArgs.ElapsedTimeInRunningTests))}{Environment.NewLine}"; 192return text.Replace(Environment.NewLine, $"{Environment.NewLine}{indentation}").TrimEnd().Insert(0, indentation);
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Extensions\ProtocolConversions.cs (1)
973var content = markdownBuilder.Build(Environment.NewLine);
Features\DecompiledSource\AssemblyResolver.cs (1)
169=> _logger.AppendFormat(format + Environment.NewLine, args);
Features\DecompiledSource\CSharpCodeDecompilerDecompilationService.cs (2)
73text += "#if false // " + FeaturesResources.Decompilation_log + Environment.NewLine; 75text += "#endif" + Environment.NewLine;
Handler\Hover\HoverHandler.cs (1)
137.. info.Sections.SelectMany(static s => s.TaggedParts.Add(new TaggedText(TextTags.LineBreak, Environment.NewLine)))
src\LanguageServer\Microsoft.CommonLanguageServerProtocol.Framework\AbstractLanguageServer.cs (4)
128throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 133throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (4)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (2)
156string.Join(Environment.NewLine, expectedNames), 157string.Join(Environment.NewLine, actualNames));
SpellCheck\SpellCheckTests.cs (2)
78var markup = string.Join(Environment.NewLine, Enumerable.Range(0, 5500).Select(v => 83{{string.Join(Environment.NewLine, Enumerable.Repeat("", random.Next() % 5))}}
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
TelemetryReporterTests.cs (1)
24Environment.SetEnvironmentVariable("CommonPropertyBagPath", Path.GetTempFileName());
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (31)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidEmptyInterfacesTests.cs (4)
300("/folder1/.editorconfig", $"[*.cs]" + Environment.NewLine + "dotnet_code_quality.api_surface = public"), 301("/folder2/.editorconfig", $"[*.cs]" + Environment.NewLine + $"dotnet_code_quality.api_surface = {(hasConflict ? "internal" : "public")}"), 328("/folder1/.editorconfig", $"[*.vb]" + Environment.NewLine + "dotnet_code_quality.api_surface = public"), 329("/folder2/.editorconfig", $"[*.vb]" + Environment.NewLine + $"dotnet_code_quality.api_surface = {(hasConflict ? "internal" : "public")}"),
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\IdentifiersShouldNotMatchKeywordsTypeRuleTests.cs (4)
270("/folder1/.editorconfig", $"[*.cs]" + Environment.NewLine + editorConfigText1), 271("/folder2/.editorconfig", $"[*.cs]" + Environment.NewLine + editorConfigText2), 298("/folder1/.editorconfig", $"[*.cs]" + Environment.NewLine + editorConfigText1), 299("/folder2/.editorconfig", $"[*.cs]" + Environment.NewLine + editorConfigText2),
Microsoft.NetCore.Analyzers\Performance\DoNotUseCountWhenAnyCanBeUsedTests.Code.cs (3)
397var index = -Environment.NewLine.Length; 398while ((index = source.IndexOf(Environment.NewLine, index + Environment.NewLine.Length, StringComparison.Ordinal)) >= 0)
Microsoft.NetCore.Analyzers\Performance\UseSearchValuesTests.cs (3)
481string newLineAfterSearchValues = isProperty && createWillUseMemberReference ? Environment.NewLine : ""; 482string expectedMemberDefinition = createWillUseMemberReference ? $"{memberDefinition}{Environment.NewLine} " : ""; 969string expectedMemberDefinition = memberHasOtherUses ? $"{Environment.NewLine} {memberDefinition}" : "";
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstringTests.cs (8)
1791string usings = includeUsings ? $"{Environment.NewLine}using System;{Environment.NewLine}" : string.Empty; 1827string indentedStatements = indent + statements.TrimStart().Replace(Environment.NewLine, Environment.NewLine + indent, StringComparison.Ordinal); 1828string imports = includeImports ? $"{Environment.NewLine}Imports System{Environment.NewLine}" : string.Empty; 1846private static string IndentLines(string lines, string indent) => indent + lines.TrimStart().Replace(Environment.NewLine, Environment.NewLine + indent, StringComparison.Ordinal);
Microsoft.NetCore.Analyzers\Runtime\UseCancellationTokenThrowIfCancellationRequestedTests.cs (2)
677return indent + lines.TrimStart().Replace(Environment.NewLine, Environment.NewLine + indent, StringComparison.Ordinal);
Microsoft.NetCore.Analyzers\Runtime\UseSpanBasedStringConcatTests.cs (6)
377FixedCode = $"{Environment.NewLine}{CSUsings}{Environment.NewLine}" + CSWithBody(@"var _ = string.Concat(foo, bar.AsSpan(1));"), 414FixedCode = $"{Environment.NewLine}{VBUsings}{Environment.NewLine}" + VBWithBody(@"Dim s = String.Concat(foo, bar.AsSpan(1))"), 854return indent + body.TrimStart().Replace(Environment.NewLine, Environment.NewLine + indent, StringComparison.Ordinal);
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.PooledObjects.Package (4)
ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.CodeAnalysis.PublicApiAnalyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (1)
PublicApiFixHelpers.cs (1)
93return Environment.NewLine;
Microsoft.CodeAnalysis.PublicApiAnalyzers.UnitTests (1)
DeclarePublicAPIAnalyzerTestsBase.cs (1)
1945""", @"", $"C", $"C{Environment.NewLine}C.Field1 -> int");
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\ThrowingTraceListener.cs (1)
16(string.IsNullOrEmpty(detailMessage) ? "" : Environment.NewLine + detailMessage));
Services\BrokeredServiceBase.cs (1)
215Environment.SetEnvironmentVariable("MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH", loadDir);
Microsoft.CodeAnalysis.Remote.Workspaces (4)
ExportProviderBuilder.cs (4)
73LogTrace($"Composing MEF catalog using:{Environment.NewLine}{string.Join($" {Environment.NewLine}", AssemblyPaths)}."); 125hashContents.Append(Environment.Version.Major.ToString(System.Globalization.CultureInfo.InvariantCulture)); 213LogError($"Encountered errors in the MEF composition:{Environment.NewLine}{ex.ErrorsAsString}", ex);
Microsoft.CodeAnalysis.ResxSourceGenerator (29)
AbstractResxGenerator.cs (5)
207var exceptionLines = ex.ToString().Split([Environment.NewLine], StringSplitOptions.None); 208var text = string.Join("", exceptionLines.Select(line => "#error " + line + Environment.NewLine)); 520{{string.Join(Environment.NewLine, getResourceStringAttributes.Select(attr => memberIndent + attr))}} 578namespaceStart = $@"namespace {namespaceName}{Environment.NewLine}{{"; 653var crLf = Environment.NewLine;
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.ResxSourceGenerator.UnitTests (2)
Verifiers\CSharpVerifierHelper.cs (2)
27var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\CommonObjectFormatter.cs (2)
43newLine: Environment.NewLine, 74builder.Append(Environment.NewLine);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (6)
MetadataShadowCopyProviderTests.cs (6)
31FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.Windows)), 32FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)), 33FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)),
Microsoft.CodeAnalysis.Scripting.TestUtilities (5)
ObjectFormatterTestBase.cs (3)
21foreach (var line in str.Split(new[] { Environment.NewLine + " " }, StringSplitOptions.None)) 29Assert.Equal(expected[i] + Environment.NewLine + "}" + Environment.NewLine, line);
TestCSharpObjectFormatter.cs (1)
31newLine: Environment.NewLine,
TestVisualBasicObjectFormatter.cs (1)
32newLine: Environment.NewLine,
Microsoft.CodeAnalysis.Test.Utilities (77)
Assert\ArtifactUploadUtil.cs (1)
60var uploadDir = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
Assert\AssertEx.cs (10)
137Fail("expected was null, but actual wasn't" + Environment.NewLine + message); 141Fail("actual was null, but expected wasn't" + Environment.NewLine + message); 160Fail(message + Environment.NewLine + expectedAndActual); 652private static readonly string s_diffToolPath = Environment.GetEnvironmentVariable("ROSLYN_DIFFTOOL"); 684itemSeparator = "," + Environment.NewLine; 789itemSeparator = "," + Environment.NewLine; 907itemSeparator: Environment.NewLine, 994var stack = ex.StackTrace.Split(new[] { Environment.NewLine }, StringSplitOptions.None); 1026Fail("Filter does not match any item in the collection: " + Environment.NewLine + 1027ToString(collection, itemSeparator ?? Environment.NewLine, itemInspector));
Assert\ConditionalFactAttribute.cs (1)
272public override bool ShouldSkip => !Environment.Is64BitProcess;
Assert\DiffUtil.cs (1)
99return DiffReport(exlines, aclines, separator: Environment.NewLine);
CommonTestBase.cs (1)
500=> source.Replace(Environment.NewLine, "\r\n");
Compilation\CompilationDifference.cs (1)
99Assert.True(sequencePointMarkers.Count > 0, $"No sequence points found in:{Environment.NewLine}{actualPdb}");
Compilation\CompilationExtensions.cs (4)
40!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ROSLYN_TEST_IOPERATION")); 47!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ROSLYN_TEST_USEDASSEMBLIES")); 246actualTextBuilder.Append(Environment.NewLine); 251actualTextBuilder.Append(Environment.NewLine);
Compilation\CompilationTestDataExtensions.cs (3)
71"Could not determine best match for method named: " + qualifiedMethodName + Environment.NewLine + 72string.Join(Environment.NewLine, keys.Select(s => " " + s)) + Environment.NewLine);
Compilation\OperationTreeVerifier.cs (5)
65char[] newLineChars = Environment.NewLine.ToCharArray(); 69expectedOperationTree = expectedOperationTree.Replace("\r\n", "\n").Replace(" \n", "\n").Replace("\n", Environment.NewLine); 163var text = syntax.ToString().Trim(Environment.NewLine.ToCharArray()); 164var lines = text.Split(new[] { Environment.NewLine, "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).Select(l => l.Trim()).ToArray(); 191LogString(Environment.NewLine);
CompilationVerifier.cs (7)
37internal static string? DumpAssemblyLocation { get; set; } = Environment.GetEnvironmentVariable("ROSLYN_TEST_DUMP_PATH"); 112throw new Exception($"Didn't find method '{methodName}'. Available/distinguishable methods are: {Environment.NewLine}{string.Join(Environment.NewLine, map.Keys)}"); 358Environment.FailFast("Investigating flaky IL verification issue. Tracked by https://github.com/dotnet/roslyn/issues/63782"); 467$"IL Verify failed unexpectedly:{Environment.NewLine}{actualMessage}" : 509return string.Join(Environment.NewLine, result.Select(r => printMethod(r.Method, metadataReader) + r.Message + printErrorArguments(r.ErrorArguments))); 762throw new Exception($"Failed to extract PDB information. PdbToXmlConverter returned:{Environment.NewLine}{actualPdbXml}");
Diagnostics\CommonDiagnosticAnalyzers.cs (8)
157" + String.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @" 171" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @" 234" + String.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @" 248" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @" 376" + string.Join("," + Environment.NewLine + " ", suppressionKinds.Select(s => $"\"{s}\"")) + @" 474" + string.Join("," + Environment.NewLine + " ", Descriptor1.CustomTags.Select(s => $"\"{s}\"")) + @" 495" + String.Join("," + Environment.NewLine + " ", Descriptor2.CustomTags.Select(s => $"\"{s}\"")) + @" 1131Assert.True(Environment.ProcessorCount > 1, "This analyzer is intended to be used only in a concurrent environment.");
Diagnostics\DiagnosticDescription.cs (1)
541assertText.Append(DiffUtil.DiffReport(unmatchedExpectedText, unmatchedActualText, separator: Environment.NewLine));
Diagnostics\DiagnosticsHelper.cs (3)
21Assert.True(match.Success, "Could not find a match for \"" + pattern + "\" in:" + Environment.NewLine + source); 29Environment.NewLine + "Expected: " + string.Join(", ", expectedDiagnosticIds) + 30Environment.NewLine + "Actual: " + string.Join(", ", actualDiagnosticIds));
Diagnostics\ThrowingDiagnosticAnalyzer.cs (11)
99Assert.True(!handled.Any(h => h == false) && handled.Any(h => true), Environment.NewLine + 100" Exceptions thrown by analyzers in these members were *NOT* handled:" + Environment.NewLine + string.Join(Environment.NewLine, membersHandled.Where(mh => mh.Handled == false).Select(mh => mh.Member)) + Environment.NewLine + Environment.NewLine + 101" Exceptions thrown from these members were handled gracefully:" + Environment.NewLine + string.Join(Environment.NewLine, membersHandled.Where(mh => mh.Handled == true).Select(mh => mh.Member)) + Environment.NewLine + Environment.NewLine + 102" These members were not called/accessed by analyzer engine:" + Environment.NewLine + string.Join(Environment.NewLine, membersHandled.Where(mh => mh.Handled == null).Select(mh => mh.Member)));
Diagnostics\TrackingDiagnosticAnalyzer.cs (4)
167Environment.NewLine + "Expected: " + string.Join(", ", expected) + 168Environment.NewLine + "Actual: " + string.Join(", ", actual)); 177Environment.NewLine + "Missing: " + string.Join(", ", missingElements) + 178Environment.NewLine + "Present: " + string.Join(", ", presentElements));
DotNetCoreSdk.cs (2)
31var dotNetInstallDir = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR"); 34dotNetInstallDir = Environment.GetEnvironmentVariable("PATH")!
FX\EnsureEnglishUICulture.cs (3)
35_threadId = Environment.CurrentManagedThreadId; 49Debug.Assert(_threadId == Environment.CurrentManagedThreadId); 51if (_needToRestore && _threadId == Environment.CurrentManagedThreadId)
FX\EnsureInvariantCulture.cs (3)
20_threadId = Environment.CurrentManagedThreadId; 28Debug.Assert(_threadId == Environment.CurrentManagedThreadId); 30if (_threadId == Environment.CurrentManagedThreadId)
FX\ProcessResult.cs (4)
32Environment.NewLine + 34Environment.NewLine + 36Environment.NewLine + 38Environment.NewLine +
Metadata\IlasmUtilities.cs (2)
128"The provided IL cannot be compiled." + Environment.NewLine + 129IlasmPath + " " + arguments + Environment.NewLine +
Platform\Custom\OSVersion.cs (1)
15System.Environment.OSVersion.Version.Build >= 9200;
ThrowingTraceListener.cs (1)
28(string.IsNullOrEmpty(detailMessage) ? "" : Environment.NewLine + detailMessage));
Microsoft.CodeAnalysis.TestAnalyzerReference (1)
NonSourceFileRefactoring.cs (1)
28var newText = SourceText.From(text.ToString() + Environment.NewLine + "# Refactored");
Microsoft.CodeAnalysis.Threading.Package (4)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.UnitTests (23)
Analyzers\AnalyzerConfigTests.cs (3)
203var config = ParseConfigFile(string.Join(Environment.NewLine, 351var config = ParseConfigFile(string.Join(Environment.NewLine, 362var config = ParseConfigFile(string.Join(Environment.NewLine,
Diagnostics\SuppressMessageAttributeCompilerTests.cs (3)
167exception.ToString().Substring(0, exception.ToString().IndexOf("---")) + "-----" + Environment.NewLine + Environment.NewLine + 168string.Format(CodeAnalysisResources.CompilerAnalyzerThrows, AnalyzerName, exception.GetType().ToString(), exception.Message, exception.ToString() + Environment.NewLine + "-----"))}")
FileUtilitiesTests.cs (1)
58switch (Environment.OSVersion.Platform)
MetadataReferences\ModuleMetadataTests.cs (4)
121char systemDrive = Environment.GetFolderPath(Environment.SpecialFolder.Windows)[0]; 126Assert.Throws<IOException>(() => ModuleMetadata.CreateFromFile(Environment.GetFolderPath(Environment.SpecialFolder.Windows)));
Text\LargeTextTests.cs (2)
198var newline = Environment.NewLine; 214var newlineLength = Environment.NewLine.Length;
Text\StringText_LineTest.cs (6)
18string newLine = Environment.NewLine; 30var text = SourceText.From("goo" + Environment.NewLine); 41var text = SourceText.From("goo" + Environment.NewLine + "bar"); 82var text = SourceText.From("goo" + Environment.NewLine); 97var text = SourceText.From(Environment.NewLine); 100Assert.Equal(Environment.NewLine.Length, line.SpanIncludingLineBreak.Length);
Text\StringTextDecodingTests.cs (1)
220var parallelOptions = new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount * 2 };
Text\StringTextTest.cs (2)
151string newLine = Environment.NewLine; 167var newlineLength = Environment.NewLine.Length;
Text\StringTextTests_Default.cs (1)
57string newLine = Environment.NewLine;
Microsoft.CodeAnalysis.Workspaces (40)
Log\RoslynEventSource.LogBlock.cs (2)
72_tick = Environment.TickCount; 147var delta = Environment.TickCount - _tick;
Log\TraceLogger.cs (3)
22=> Trace.WriteLine(string.Format("[{0}] {1} - {2}", Environment.CurrentManagedThreadId, functionId.ToString(), logMessage.GetMessage())); 25=> Trace.WriteLine(string.Format("[{0}] Start({1}) : {2} - {3}", Environment.CurrentManagedThreadId, uniquePairId, functionId.ToString(), logMessage.GetMessage())); 30Trace.WriteLine(string.Format("[{0}] End({1}) : [{2}ms] {3}", Environment.CurrentManagedThreadId, uniquePairId, delta, functionString));
Log\WorkspaceErrorLogger.cs (1)
25=> exception.Message + Environment.NewLine + exception.StackTrace;
Remote\IRemoteKeepAliveService.cs (1)
70if (Environment.HasShutdownStarted)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (2)
207var enabled = Environment.GetEnvironmentVariable("RoslynWaiterEnabled"); 228var enabled = Environment.GetEnvironmentVariable("RoslynWaiterDiagnosticTokenEnabled");
src\Compilers\Core\Portable\DiagnosticAnalyzer\ProgramFilesAnalyzerPathResolver.cs (2)
34var programFilesPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
449NativeMethods.sqlite3_errmsg(handle) + Environment.NewLine +
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (3)
50var appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.Create);
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (7)
85if (Environment.GetEnvironmentVariable("DOTNET_ROOT") is string dotnetRoot && !string.IsNullOrEmpty(dotnetRoot)) 92referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Reference Assemblies", "Microsoft", "Framework")); 93referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "dotnet", "packs")); 110referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages"));
Microsoft.CodeAnalysis.Workspaces.MSBuild (7)
MSBuild\BuildHostProcessManager.cs (3)
163static string GetProcessPath() => Environment.ProcessPath ?? throw new InvalidOperationException("Unable to determine the path of the current process."); 528_logger.LogError("The BuildHost process is not responding. Process output:{newLine}{processLog}", Environment.NewLine, processLog); 530_logger.LogError("The BuildHost process exited with {errorCode}. Process output:{newLine}{processLog}", _process.ExitCode, Environment.NewLine, processLog);
MSBuild\DiagnosticReporterLoggerProvider.cs (1)
53message += Environment.NewLine + exception.ToString();
Rpc\RpcClient.cs (2)
67var message = $"Failed to deserialize response from build host:{Environment.NewLine}{line}"; 161var requestJson = JsonConvert.SerializeObject(request, JsonSettings.SingleLineSerializerSettings) + Environment.NewLine;
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
27var path = Environment.GetEnvironmentVariable("PATH");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
BuildHostLogger.cs (1)
31output.Write(Environment.NewLine);
Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
27var path = Environment.GetEnvironmentVariable("PATH");
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Compilers\Core\Portable\InternalUtilities\TextKeyedCache.cs (1)
88Environment.ProcessorCount * 4);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
NetCoreTests.cs (2)
392Assert.True(actualNames.SetEquals(expectedNames), $"Project names differ!{Environment.NewLine}Actual: {{{actualNames.Join(",")}}}{Environment.NewLine}Expected: {{{expectedNames.Join(",")}}}");
NewlyCreatedProjectsFromDotNetNew.cs (1)
264throw new InvalidOperationException(string.Join(Environment.NewLine,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
MEF\ExportProviderCache.cs (1)
168"Failed to construct the MEF catalog for testing. Multiple exports were found for a part for which only one export is expected:" + Environment.NewLine
Workspaces\TestWorkspace`1.cs (2)
121: $"{title}:{Environment.NewLine}{Environment.NewLine}{message}";
Microsoft.CodeAnalysis.Workspaces.UnitTests (3)
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (3)
148if (Environment.Is64BitOperatingSystem && !Environment.Is64BitProcess) 245var random = new Random(Environment.TickCount);
Microsoft.CommonLanguageServerProtocol.Framework.Example (3)
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.CommonLanguageServerProtocol.Framework.Package (7)
AbstractLanguageServer.cs (4)
128throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 133throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}");
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.Data.Analysis (1)
TextFieldParser.cs (1)
181private readonly char[] _newLineChars = Environment.NewLine.ToCharArray();
Microsoft.Data.Analysis.Tests (1)
src\Microsoft.Data.Analysis\TextFieldParser.cs (1)
181private readonly char[] _newLineChars = Environment.NewLine.ToCharArray();
Microsoft.DotNet.ApiCompat.IntegrationTests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.DotNet.ApiCompat.Task (4)
TaskBase.cs (4)
70Environment.NewLine, 74Environment.NewLine); 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 104s += Environment.NewLine + stackTrace;
Microsoft.DotNet.ApiDiff (5)
MemoryOutputDiffGenerator.cs (4)
80_endOfLineTrivia = Environment.NewLine == "\r\n" ? SyntaxFactory.CarriageReturnLineFeed : SyntaxFactory.LineFeed; 120string finalMessage = $"Finished visiting {beforeAssemblySymbol.Name} (before) in {swAssembly.Elapsed.TotalMilliseconds / 1000.0:F2}s{Environment.NewLine}"; 159string finalMessage = $"Finished visiting *{assemblyDescriptor}* assembly {afterAssemblySymbol.Name} in {swNew.Elapsed.TotalMilliseconds / 1000.0:F2}s{Environment.NewLine}"; 165finalMessage += $"Finished generating diff for *{assemblyDescriptor}* assembly {afterAssemblySymbol.Name} in {swNew.Elapsed.TotalMilliseconds / 1000.0:F2}s{Environment.NewLine}";
SyntaxRewriter\RemoveBodySyntaxRewriter.cs (1)
19private readonly SyntaxTriviaList _endLineTrivia = SyntaxFactory.TriviaList((Environment.NewLine == "\r\n") ? SyntaxFactory.CarriageReturnLineFeed : SyntaxFactory.LineFeed);
Microsoft.DotNet.ApiDiff.Tests (3)
Diff.Base.Tests.cs (1)
18private readonly string[] _separator = [Environment.NewLine];
Diff.Disk.Tests.cs (1)
519string failureMessages = string.Join(Environment.NewLine, failures.Select(f => $"{f.Id}: {f.GetMessage()}"));
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.DotNet.ApiDiff.Tool (1)
Program.cs (1)
209Console.WriteLine($"Attach to process {Environment.ProcessId}...");
Microsoft.DotNet.Arcade.Sdk (2)
src\GenerateResxSource.cs (1)
248namespaceStart = $@"namespace {namespaceName}{Environment.NewLine}{{";
src\LocateDotNet.cs (1)
48var paths = Environment.GetEnvironmentVariable("PATH");
Microsoft.DotNet.ArcadeAzureIntegration (15)
AzureCliCredentialWithAzNoUpdateWrapper.cs (7)
32public static string? EnvProgramFilesX86 => GetNonEmptyStringOrNull(Environment.GetEnvironmentVariable("ProgramFiles(x86)")); 33public static string? EnvProgramFiles => GetNonEmptyStringOrNull(Environment.GetEnvironmentVariable("ProgramFiles")); 34public static string? EnvPath => GetNonEmptyStringOrNull(Environment.GetEnvironmentVariable("PATH")); 37private static readonly string DefaultWorkingDirWindows = Environment.GetFolderPath(Environment.SpecialFolder.System); 64fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe");
DefaultIdentityTokenCredential.cs (8)
121string? servicePrincipalId = Environment.GetEnvironmentVariable("servicePrincipalId"); 122string? idToken = Environment.GetEnvironmentVariable("idToken"); 123string? tenantId = Environment.GetEnvironmentVariable("tenantId"); 153string? systemAccessToken = Environment.GetEnvironmentVariable("SYSTEM_ACCESSTOKEN"); 154string? clientId = Environment.GetEnvironmentVariable("AZURESUBSCRIPTION_CLIENT_ID"); 155string? tenantId = Environment.GetEnvironmentVariable("AZURESUBSCRIPTION_TENANT_ID"); 156string? serviceConnectionId = Environment.GetEnvironmentVariable("AZURESUBSCRIPTION_SERVICE_CONNECTION_ID"); 162!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SYSTEM_OIDCREQUESTURI")))
Microsoft.DotNet.Baselines.Tasks (1)
CreateUpdatePR.cs (1)
74public string? GitHubToken { get; set; } = Environment.GetEnvironmentVariable("GH_TOKEN");
Microsoft.DotNet.Build.Tasks.Feed (24)
src\ConfigureInputFeed.cs (12)
33string nugetConfigBody = $"<?xml version=\"1.0\" encoding=\"utf-8\"?>{Environment.NewLine}<configuration>{Environment.NewLine}"; 34nugetConfigBody += $"<!--Don't use any higher level config files.{Environment.NewLine}Our builds need to be isolated from user/ machine state-->{Environment.NewLine}"; 35nugetConfigBody += $"<fallbackPackageFolders>{Environment.NewLine}<clear />{Environment.NewLine}</fallbackPackageFolders>{Environment.NewLine}<packageSources>{Environment.NewLine}<clear />{Environment.NewLine}"; 38nugetConfigBody += $"<add key=\"inputFeed{i}\" value=\"{ EnableFeeds[i].ItemSpec }\" />{Environment.NewLine}"; 40nugetConfigBody += $"</packageSources>{Environment.NewLine}"; 41nugetConfigBody += $"</configuration>{Environment.NewLine}";
src\GetEnvProxy.cs (1)
17var value = Environment.GetEnvironmentVariable(key);
src\PublishArtifactsInManifestBase.cs (9)
622$"Publishing Symbols to Symbol server:" + Environment.NewLine + 623$"\tTemp symbol org: {TempSymbolsAzureDevOpsOrg}" + Environment.NewLine + 624$"\tFinal symbol visibility: {publishVisibility}" + Environment.NewLine + 625$"\tRequest Name: {requestName}" + Environment.NewLine + 626$"\tSymbol packages ({symbolPackagesToPublish.Count}):{Environment.NewLine}\t\t{string.Join($"{Environment.NewLine}\t\t", symbolPackagesToPublish.Select(s => s.Id))}" + Environment.NewLine + 627$"\tLoose symbol files ({looseFiles.Count()}): {Environment.NewLine}\t\t{string.Join($"{Environment.NewLine}\t\t", looseFiles)}");
src\PublishBuildToMaestro.cs (2)
186if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILD_BUILDID"))) 532if (Environment.GetEnvironmentVariable("GITHUB_TOKEN") is string envGitHubToken)
Microsoft.DotNet.Build.Tasks.Installers (1)
src\CreateWixBuildWixpack.cs (1)
432File.WriteAllText(Path.Combine(WixpackWorkingDir, "create.rsp"), string.Join(System.Environment.NewLine, commandLineArgs));
Microsoft.DotNet.Build.Tasks.VisualStudio (3)
OptProf\GetRunSettingsSessionConfiguration.cs (3)
92$"Unable to read bootstrapper info: {e.Message}{Environment.NewLine}" + 93$"Content of BootstrapperInfo.json:{Environment.NewLine}" + 133Environment.NewLine,
Microsoft.DotNet.Cli.Utils (36)
AnsiConsole.cs (1)
18_ansiEnabled = string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("NO_COLOR"));
DebugHelper.cs (1)
23int processId = Environment.ProcessId;
EnvironmentProvider.cs (8)
15private readonly Lazy<string> _userHomeDirectory = new(() => Environment.GetEnvironmentVariable("HOME") ?? string.Empty); 25? Environment.GetEnvironmentVariable("PATHEXT")? 43searchPaths.AddRange(Environment 108return Environment.GetEnvironmentVariable(name); 113var str = Environment.GetEnvironmentVariable(name); 136return Environment.GetEnvironmentVariable(variable, target); 141Environment.SetEnvironmentVariable(variable, value, target); 146if (Environment.GetEnvironmentVariable(variable) is string strValue && int.TryParse(strValue, out int intValue))
Extensions\AnsiExtensions.cs (1)
11var environment = Environment.GetEnvironmentVariable("TERM");
Extensions\LockFileFormatExtensions.cs (1)
20Environment.NewLine,
GracefulException.cs (2)
25: this(string.Join(Environment.NewLine, messages), isUserError: isUserError) 29VerboseMessage = string.Join(Environment.NewLine, verboseMessages);
MSBuildForwardingAppWithoutLogging.cs (5)
159savedEnvironmentVariables[kvp.Key] = Environment.GetEnvironmentVariable(kvp.Key); 160Environment.SetEnvironmentVariable(kvp.Key, kvp.Value); 184Environment.SetEnvironmentVariable(kvp.Key, kvp.Value); 205var envMSBuildSDKsPath = Environment.GetEnvironmentVariable("MSBuildSDKsPath"); 226{ "MSBuildExtensionsPath", MSBuildExtensionsPathTestHook ?? Environment.GetEnvironmentVariable("MSBuildExtensionsPath") ?? AppContext.BaseDirectory },
Muxer.cs (3)
56string? processPath = Environment.ProcessPath; 65processPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH"); 69var root = Environment.GetEnvironmentVariable("DOTNET_ROOT");
PathUtility.cs (1)
384Environment.NewLine,
ProcessReaper.cs (4)
55if (Environment.OSVersion.Version.Major > 6 || 56(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor >= 2)) 152Environment.ExitCode = _process.ExitCode;
RuntimeEnvironment.cs (3)
61return Environment.OSVersion.Version.ToString(3); 66return Environment.OSVersion.Version.ToString(2); 74return Environment.OSVersion.Version.ToString(1);
UILanguageOverride.cs (6)
77string? dotnetCliLanguage = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE); 89string? vsLang = Environment.GetEnvironmentVariable(VSLANG); 105string? currentValue = Environment.GetEnvironmentVariable(environmentVariableName); 108Environment.SetEnvironmentVariable(environmentVariableName, value); 119if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version.Major >= 10) // UTF-8 is only officially supported on 10+. 146return string.Equals(Environment.GetEnvironmentVariable("DOTNET_CLI_FORCE_UTF8_ENCODING"), "true", StringComparison.OrdinalIgnoreCase);
Microsoft.DotNet.Cli.Utils.Tests (7)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
RuntimeEnvironmentTests.cs (2)
19Version expectedOSVersion = Environment.OSVersion.Version; 35Version expectedOSVersion = Environment.OSVersion.Version;
StreamForwarderTests.cs (4)
51expectedWrites[i] += Environment.NewLine; 63expectedWrites[i] += Environment.NewLine; 77expectedWrites[i] += Environment.NewLine; 99forwarder.ForwardTo(writeLine: s => writes.Add(s + Environment.NewLine));
Microsoft.DotNet.Configurer (5)
CliFolderPathCalculator.cs (2)
17Environment.GetEnvironmentVariable("DOTNET_CLI_TEST_FALLBACKFOLDER") ?? 34return string.IsNullOrEmpty(Environment.GetEnvironmentVariable(DotnetHomeVariableName))
CliFolderPathCalculatorCore.cs (3)
24var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName); 27home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
Microsoft.DotNet.GenAPI (1)
CSharpAssemblyDocumentGenerator.cs (1)
91compilationUnit = compilationUnit.NormalizeWhitespace(eol: Environment.NewLine);
Microsoft.DotNet.GenAPI.Task (4)
TaskBase.cs (4)
70Environment.NewLine, 74Environment.NewLine); 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 104s += Environment.NewLine + stackTrace;
Microsoft.DotNet.GenAPI.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.DotNet.Helix.JobSender (5)
JobDefinition.cs (5)
205if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILD_REPOSITORY_NAME")) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"))) 213string repoName = Environment.GetEnvironmentVariable("BUILD_REPOSITORY_NAME"); 214string branchName = Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"); 299return Environment.GetEnvironmentVariable(name) ?? throw new ArgumentException("Missing required environment variable", name);
Microsoft.DotNet.Helix.Sdk (4)
AzureDevOpsTask.cs (2)
23private bool InAzurePipeline => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("BUILD_BUILDNUMBER")); 27var result = Environment.GetEnvironmentVariable(name);
InstallDotNetTool.cs (1)
175Environment.NewLine + (string.IsNullOrEmpty(result.StdErr) ? result.StdOut : result.StdErr));
SendHelixJob.cs (1)
271var value = Environment.GetEnvironmentVariable(envName);
Microsoft.DotNet.Helix.Sdk.Tests (5)
HelpersTests.cs (5)
48string target = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") ?? Environment.GetEnvironmentVariable("TEMP") ?? Environment.GetEnvironmentVariable("TMPDIR"), "my-test-file-123456.snt"); 52if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DOCKER_ENTRYPOINT"))) 54target = Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD"), "my-test-file-123456.snt");
Microsoft.DotNet.HotReload.Agent.Package (4)
HotReloadAgent.cs (4)
237Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks, 238RemoveCurrentAssembly(startupHookType, Environment.GetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks)!)); 240Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetWatchHotReloadNamedPipeName, null); 241Environment.SetEnvironmentVariable(AgentEnvironmentVariables.HotReloadDeltaClientLogMessages, null);
Microsoft.DotNet.HotReload.Client.Package (3)
FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.DotNet.HotReload.Client.Tests (9)
ArrayBufferWriterTests.cs (2)
318[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))]
AssertEx.cs (4)
120Fail("expected was null, but actual wasn't" + Environment.NewLine + message); 124Fail("actual was null, but expected wasn't" + Environment.NewLine + message); 135Fail(message + Environment.NewLine + expectedAndActual); 182itemSeparator ??= (typeof(T) == typeof(byte)) ? ", " : "," + Environment.NewLine;
FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Microsoft.DotNet.HotReload.WebAssembly.Browser (5)
HotReloadAgent.cs (4)
237Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks, 238RemoveCurrentAssembly(startupHookType, Environment.GetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks)!)); 240Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetWatchHotReloadNamedPipeName, null); 241Environment.SetEnvironmentVariable(AgentEnvironmentVariables.HotReloadDeltaClientLogMessages, null);
WebAssemblyHotReload.cs (1)
69if (MetadataUpdater.IsSupported && Environment.GetEnvironmentVariable("__ASPNETCORE_BROWSER_TOOLS") == "true" &&
Microsoft.DotNet.MSBuildSdkResolver (16)
CachingWorkloadResolver.cs (1)
61var envVar = Environment.GetEnvironmentVariable("MSBuildEnableWorkloadResolver");
CliFolderPathCalculatorCore.cs (3)
24var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName); 27home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
EnvironmentProvider.cs (2)
109getEnvironmentVariable = Environment.GetEnvironmentVariable; 117getEnvironmentVariable ??= Environment.GetEnvironmentVariable;
MSBuildSdkResolver.cs (2)
78: this(Environment.GetEnvironmentVariable, null, GetMSbuildRuntimeVersion, VSSettings.Ambient) 420string? startDir = Environment.CurrentDirectory;
NETCoreSdkResolver.cs (1)
25: this(Environment.GetEnvironmentVariable, VSSettings.Ambient)
SdkDirectoryWorkloadManifestProvider.cs (2)
41: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath) 47return new SdkDirectoryWorkloadManifestProvider(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath: null, workloadSetVersion);
VSSettings.cs (2)
54Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
WorkloadInstallType.cs (2)
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
WorkloadResolver.cs (1)
45var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS);
Microsoft.DotNet.MSBuildSdkResolver.Tests (11)
GivenAnMSBuildSdkResolver.cs (11)
69result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 94result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 121result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 202result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 322result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 404result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 426result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 453result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 481result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 555result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}"); 584result.Success.Should().BeTrue($"No error expected. Error encountered: {string.Join(Environment.NewLine, result.Errors ?? new string[] { })}. Mocked Process Path: {environment.ProcessPath}. Mocked Path: {environment.PathEnvironmentVariable}");
Microsoft.DotNet.NativeWrapper (3)
EnvironmentProvider.cs (3)
109getEnvironmentVariable = Environment.GetEnvironmentVariable; 117getEnvironmentVariable ??= Environment.GetEnvironmentVariable; 127currentProcessPath = Environment.ProcessPath;
Microsoft.DotNet.NuGetRepack.Tests (1)
TestHelpers\DiffUtil.cs (1)
96return DiffReport(exlines, aclines, separator: Environment.NewLine);
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiAddURLTests.cs (1)
431"indicating failure. The url might be wrong, or there might be a networking issue." + Environment.NewLine, _error.ToString());
Microsoft.DotNet.PackageInstall.Tests (9)
NuGetPackageInstallerTests.cs (4)
164string relativePath = Path.GetRelativePath(Environment.CurrentDirectory, getTestLocalFeedPath); 178string relativePath = Path.GetRelativePath(Environment.CurrentDirectory, getTestLocalFeedPath); 199string relativePath = Path.GetRelativePath(Environment.CurrentDirectory, getTestLocalFeedPath); 220string relativePath = Path.GetRelativePath(Environment.CurrentDirectory, getTestLocalFeedPath);
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
TestToolBuilder.cs (1)
205var outputDict = result.StdOut!.Split(Environment.NewLine)
ToolPackageDownloaderTests.cs (3)
30_originalPath = Environment.GetEnvironmentVariable(_PATH_VAR_NAME); 31Environment.SetEnvironmentVariable(_PATH_VAR_NAME, dotnetRootUnderTest + Path.PathSeparator + _originalPath); 34public void Dispose() => Environment.SetEnvironmentVariable(_PATH_VAR_NAME, _originalPath);
Microsoft.DotNet.RemoteExecutor (7)
Program.cs (2)
26Environment.Exit(-1); 113Environment.Exit(exitCode);
RemoteExecutor.cs (4)
95Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); 104int.TryParse(Environment.GetEnvironmentVariable("DOTNET_TEST_TIMEOUT_MULTIPLIER"), out int failWaitTimeoutMultiplier); 118Environment.GetEnvironmentVariable("DOTNET_REMOTEEXECUTOR_SUPPORTED") != "0"; 538"," + Environment.NewLine,
RemoteInvokeHandle.cs (1)
152string uploadPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT");
Microsoft.DotNet.SdkResolver (1)
NETCoreSdkResolver.cs (1)
25: this(Environment.GetEnvironmentVariable, VSSettings.Ambient)
Microsoft.DotNet.SharedFramework.Sdk (1)
src\ValidateFileVersions.cs (1)
86string.Concat(versionlessFiles.Select(f => Environment.NewLine + f)));
Microsoft.DotNet.SignCheckLibrary (1)
Utils.cs (1)
169workingDirectory = Environment.CurrentDirectory;
Microsoft.DotNet.SignCheckTask (3)
src\SignCheck.cs (2)
21private static readonly string _appData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SignCheck");
src\SignCheckTask.cs (1)
143ArtifactFolder = ArtifactFolder ?? Environment.CurrentDirectory;
Microsoft.DotNet.SignTool (6)
src\BatchSignUtil.cs (1)
47_repackParallelism = repackParallelism != 0 ? repackParallelism : Environment.ProcessorCount;
src\Telemetry.cs (5)
17{ "BUILD_REPOSITORY_URI", Environment.GetEnvironmentVariable("BUILD_REPOSITORY_URI") }, 18{ "BUILD_SOURCEBRANCH", Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH") }, 19{ "BUILD_BUILDNUMBER", Environment.GetEnvironmentVariable("BUILD_BUILDNUMBER") }, 20{ "BUILD_SOURCEVERSION", Environment.GetEnvironmentVariable("BUILD_SOURCEVERSION") } 29(!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SIGNTOOL_DISABLE_TELEMETRY")));
Microsoft.DotNet.SignTool.Tests (1)
SignToolTests.cs (1)
379var actualXmlElementsPerSigningRound = buildEngine.FilesToSign.Select(round => string.Join(Environment.NewLine, round));
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Program.cs (1)
24Environment.Exit(-1);
Microsoft.DotNet.TemplateLocator (9)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
SdkDirectoryWorkloadManifestProvider.cs (2)
41: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath) 47return new SdkDirectoryWorkloadManifestProvider(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath: null, workloadSetVersion);
TemplateLocator.cs (2)
19: this(Environment.GetEnvironmentVariable, null, VSSettings.Ambient, null, null) 57string? globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
WorkloadInstallType.cs (2)
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
WorkloadResolver.cs (1)
45var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS);
Microsoft.DotNet.TemplateLocator.Tests (2)
GivenAnTemplateLocator.cs (1)
16_resolver = new TemplateLocator(Environment.GetEnvironmentVariable, null, VSSettings.Ambient, null, null);
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.DotNet.Tools.Tests.ComponentMocks (3)
ToolPackageDownloaderMock.cs (2)
63_localToolDownloadDir = new DirectoryPath(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "nuget", "package"));
ToolPackageDownloaderMock2.cs (1)
69var extraFiles = string.Join(Environment.NewLine, mockPackage.AdditionalFiles.Select(f => $"\"{f.Key}\":{{}},"));
Microsoft.DotNet.VersionTools.Cli (1)
Program.cs (1)
16RootCommand rootCommand = new("Microsoft.DotNet.VersionTools.Cli v" + Environment.Version.ToString(2))
Microsoft.DotNet.XUnitAssert.Tests (1121)
AsyncCollectionAssertsTests.cs (108)
43 "Assert.All() Failure: 2 out of 6 items in the collection did not pass." + Environment.NewLine + 44 "[2]: Item: 42" + Environment.NewLine + 45 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 46 " Expected: 1" + Environment.NewLine + 47 " Actual: 42" + Environment.NewLine + 48 "[3]: Item: 2112" + Environment.NewLine + 49 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 50 " Expected: 1" + Environment.NewLine + 95 "Assert.All() Failure: 2 out of 6 items in the collection did not pass." + Environment.NewLine + 96 "[2]: Item: 42" + Environment.NewLine + 97 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 98 " Expected: 1" + Environment.NewLine + 99 " Actual: 42" + Environment.NewLine + 100 "[3]: Item: 2112" + Environment.NewLine + 101 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 102 " Expected: 1" + Environment.NewLine + 145 "Assert.Collection() Failure: Mismatched item count" + Environment.NewLine + 146 "Collection: []" + Environment.NewLine + 147 "Expected count: 1" + Environment.NewLine + 179 "Assert.Collection() Failure: Item comparison failure" + Environment.NewLine + 180 " ↓ (pos 1)" + Environment.NewLine + 181 "Collection: [42, 2112]" + Environment.NewLine + 182 "Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 183 " Expected: 2113" + Environment.NewLine + 184 " Actual: 2112" + Environment.NewLine + 216 "Assert.Collection() Failure: Mismatched item count" + Environment.NewLine + 217 "Collection: []" + Environment.NewLine + 218 "Expected count: 1" + Environment.NewLine + 266 "Assert.Collection() Failure: Item comparison failure" + Environment.NewLine + 267 " ↓ (pos 1)" + Environment.NewLine + 268 "Collection: [42, 2112]" + Environment.NewLine + 269 "Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 270 " Expected: 2113" + Environment.NewLine + 271 " Actual: 2112" + Environment.NewLine + 311 "Assert.Contains() Failure: Item not found in collection" + Environment.NewLine + 312 "Collection: [41, 43]" + Environment.NewLine + 380 "Assert.Contains() Failure: Filter not matched in collection" + Environment.NewLine + 413 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 414 "Collection: [42, 42]" + Environment.NewLine + 429 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 430 $"Collection: [\"a\", null, \"b\", null, \"c\", {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 454 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 455 "Collection: [\"a\", \"b\", \"A\"]" + Environment.NewLine + 487 "Assert.DoesNotContain() Failure: Item found in collection" + Environment.NewLine + 488 " ↓ (pos 0)" + Environment.NewLine + 489 "Collection: [42]" + Environment.NewLine + 557 "Assert.DoesNotContain() Failure: Filter matched in collection" + Environment.NewLine + 558 " ↓ (pos 1)" + Environment.NewLine + 598 "Assert.Empty() Failure: Collection was not empty" + Environment.NewLine + 643 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 644 "Expected: " + expectedType + " []" + Environment.NewLine + 665 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 666 "Expected: null" + Environment.NewLine + 758 message += Environment.NewLine + " " + paddingBlanks + expectedPointer; 761 Environment.NewLine + "Expected: " + expectedType.PadRight(padding) + expectedDisplay + 762 Environment.NewLine + "Actual: " + actualType.PadRight(padding) + actualDisplay; 765 message += Environment.NewLine + " " + paddingBlanks + actualPointer; 796 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 797 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 798 "Expected: " + expectedType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 799 "Actual: " + actualType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 877 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 878 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 879 "Expected: " + expectedType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 880 "Actual: " + actualType.PadRight(padding) + "[1, 3]" + Environment.NewLine + 929 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 930 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 931 "Expected: " + expectedType.PadRight(padding) + "[EquatableObject { Char = 'a' }]" + Environment.NewLine + 932 "Actual: " + actualType.PadRight(padding) + "[EquatableObject { Char = 'b' }]" + Environment.NewLine + 969 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 970 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 971 "Expected: " + expectedType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 972 "Actual: " + actualType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 1030 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 1031 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1032 "Expected: " + expectedType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 1033 "Actual: " + actualType.PadRight(padding) + "[1, 3]" + Environment.NewLine + 1096 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 1097 "Expected: Not null" + Environment.NewLine + 1145 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1146 $"Expected: Not {expectedType.PadRight(padding)}[1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 1195 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1196 "Expected: Not " + expectedType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 1236 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 1237 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1238 "Expected: Not " + expectedType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 1239 "Actual: " + actualType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 1278 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1279 "Expected: Not " + expectedType.PadRight(padding) + "[EquatableObject { Char = 'a' }]" + Environment.NewLine + 1336 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1337 "Expected: Not " + expectedType.PadRight(padding) + "[1, 2, 3, 4, 5]" + Environment.NewLine + 1363 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 1364 " " + new string(' ', padding) + " ↓ (pos 0)" + Environment.NewLine + 1365 "Expected: Not " + expectedType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 1366 "Actual: " + actualType.PadRight(padding) + "[1, 2]" + Environment.NewLine + 1417 "Assert.Single() Failure: The collection contained 2 items" + Environment.NewLine + 1432 "Assert.Single() Failure: The collection contained 7 items" + Environment.NewLine + 1457 "Assert.Single() Failure: The collection contained 5 items" + Environment.NewLine + 1492 "Assert.Single() Failure: The collection did not contain any matching items" + Environment.NewLine + 1493 "Expected: (predicate expression)" + Environment.NewLine + 1508 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 1509 "Expected: (predicate expression)" + Environment.NewLine + 1510 "Collection: [\"Hello\", \"World\"]" + Environment.NewLine + 1525 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 1526 "Expected: (predicate expression)" + Environment.NewLine + 1527 $"Collection: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 1552 "Assert.Single() Failure: The collection did not contain any matching items" + Environment.NewLine + 1553 "Expected: (predicate expression)" + Environment.NewLine +
BooleanAssertsTests.cs (8)
22 "Assert.False() Failure" + Environment.NewLine + 23 "Expected: False" + Environment.NewLine + 36 "Assert.False() Failure" + Environment.NewLine + 37 "Expected: False" + Environment.NewLine + 70 "Assert.True() Failure" + Environment.NewLine + 71 "Expected: True" + Environment.NewLine + 84 "Assert.True() Failure" + Environment.NewLine + 85 "Expected: True" + Environment.NewLine +
CollectionAssertsTests.cs (174)
41 "Assert.All() Failure: 2 out of 6 items in the collection did not pass." + Environment.NewLine + 42 "[2]: Item: 42" + Environment.NewLine + 43 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 44 " Expected: 1" + Environment.NewLine + 45 " Actual: 42" + Environment.NewLine + 46 "[3]: Item: 2112" + Environment.NewLine + 47 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 48 " Expected: 1" + Environment.NewLine + 93 "Assert.All() Failure: 2 out of 6 items in the collection did not pass." + Environment.NewLine + 94 "[2]: Item: 42" + Environment.NewLine + 95 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 96 " Expected: 1" + Environment.NewLine + 97 " Actual: 42" + Environment.NewLine + 98 "[3]: Item: 2112" + Environment.NewLine + 99 " Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 100 " Expected: 1" + Environment.NewLine + 143 "Assert.Collection() Failure: Mismatched item count" + Environment.NewLine + 144 "Collection: []" + Environment.NewLine + 145 "Expected count: 1" + Environment.NewLine + 178 "Assert.Collection() Failure: Item comparison failure" + Environment.NewLine + 179 " ↓ (pos 1)" + Environment.NewLine + 180 "Collection: [42, 2112]" + Environment.NewLine + 181 "Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 182 " Expected: 2113" + Environment.NewLine + 183 " Actual: 2112" + Environment.NewLine + 216 "Assert.Collection() Failure: Mismatched item count" + Environment.NewLine + 217 "Collection: []" + Environment.NewLine + 218 "Expected count: 1" + Environment.NewLine + 266 "Assert.Collection() Failure: Item comparison failure" + Environment.NewLine + 267 " ↓ (pos 1)" + Environment.NewLine + 268 "Collection: [42, 2112]" + Environment.NewLine + 269 "Error: Assert.Equal() Failure: Values differ" + Environment.NewLine + 270 " Expected: 2113" + Environment.NewLine + 271 " Actual: 2112" + Environment.NewLine + 311 "Assert.Contains() Failure: Item not found in collection" + Environment.NewLine + 312 "Collection: [41, 43]" + Environment.NewLine + 373 "Assert.Contains() Failure: Item not found in collection" + Environment.NewLine + 374 "Collection: [\"Hi there\"]" + Environment.NewLine + 414 "Assert.Contains() Failure: Filter not matched in collection" + Environment.NewLine + 447 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 448 "Collection: [42, 42]" + Environment.NewLine + 463 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 464 $"Collection: [\"a\", null, \"b\", null, \"c\", {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 488 "Assert.Distinct() Failure: Duplicate item found" + Environment.NewLine + 489 "Collection: [\"a\", \"b\", \"A\"]" + Environment.NewLine + 521 "Assert.DoesNotContain() Failure: Item found in collection" + Environment.NewLine + 522 " ↓ (pos 0)" + Environment.NewLine + 523 "Collection: [42]" + Environment.NewLine + 555 "Assert.DoesNotContain() Failure: Item found in set" + Environment.NewLine + 556 "Set: [\"Hi there\"]" + Environment.NewLine + 573 "Assert.DoesNotContain() Failure: Item found in set" + Environment.NewLine + 574 "Set: [\"Hi there\"]" + Environment.NewLine + 635 "Assert.DoesNotContain() Failure: Filter matched in collection" + Environment.NewLine + 636 " ↓ (pos 1)" + Environment.NewLine + 676 "Assert.Empty() Failure: Collection was not empty" + Environment.NewLine + 716 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 717 "Expected: int[] []" + Environment.NewLine + 733 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 734 "Expected: null" + Environment.NewLine + 785 message += Environment.NewLine + " " + expectedPointer; 795 Environment.NewLine + "Expected: " + expectedType + ArgumentFormatter.Format(expected) + 796 Environment.NewLine + "Actual: " + actualType + ArgumentFormatter.Format(actual); 799 message += Environment.NewLine + " " + actualPointer; 860 message += Environment.NewLine + " " + expectedPointer; 863 Environment.NewLine + "Expected: " + expectedDisplay + 864 Environment.NewLine + "Actual: " + actualDisplay; 867 message += Environment.NewLine + " " + actualPointer; 882 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 883 " ↓ (pos 2, type System.Int32)" + Environment.NewLine + 884 "Expected: [1, 2, 3]" + Environment.NewLine + 885 "Actual: [1, 2, 3]" + Environment.NewLine + 1014 message += Environment.NewLine + " " + expectedPointer; 1017 Environment.NewLine + "Expected: " + expectedDisplay + 1018 Environment.NewLine + "Actual: " + actualDisplay; 1021 message += Environment.NewLine + " " + actualPointer; 1042 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1043 " ↓ (pos 0)" + Environment.NewLine + 1044 "Expected: int[] [1, 2, 3, 4, 5]" + Environment.NewLine + 1045 "Actual: List<int> [1, 2, 3, 4, 5]" + Environment.NewLine + 1111 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 1112 " ↓ (pos 0)" + Environment.NewLine + 1113 "Expected: [1, 2]" + Environment.NewLine + 1114 "Actual: [1, 3]" + Environment.NewLine + 1156 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1157 " ↓ (pos 0)" + Environment.NewLine + 1158 "Expected: [EquatableObject { Char = 'a' }]" + Environment.NewLine + 1159 "Actual: [EquatableObject { Char = 'b' }]" + Environment.NewLine + 1186 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1187 " ↓ (pos 0)" + Environment.NewLine + 1188 "Expected: int[] [1, 2, 3, 4, 5]" + Environment.NewLine + 1189 "Actual: List<int> [1, 2, 3, 4, 5]" + Environment.NewLine + 1238 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 1239 " ↓ (pos 0)" + Environment.NewLine + 1240 "Expected: [1, 2]" + Environment.NewLine + 1241 "Actual: [1, 3]" + Environment.NewLine + 1279 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1280 "Expected: [[\"a\"] = 1, [\"b\"] = 2, [\"c\"] = 3]" + Environment.NewLine + 1296 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1297 "Expected: [[\"a\"] = 1, [\"b\"] = 2]" + Environment.NewLine + 1329 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1330 $"Expected: [[\"a\"] = 1, [\"be\"] = 2, [\"c\"] = 3, [\"d\"] = 4, [\"e\"] = 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 1373 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1374 "Expected: [[\"toAddresses\"] = [\"test1@example.com\"], [\"ccAddresses\"] = [\"test2@example.com\"]]" + Environment.NewLine + 1403 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1404 "Expected: [[\"Key1\"] = EquatableObject { Char = 'a' }]" + Environment.NewLine + 1485 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1486 "Expected: [[\"key\"] = [[\"key\"] = [[[\"key\"] = [\"value1\"]]]]]" + Environment.NewLine + 1541 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1542 "Expected: [42, 2112]" + Environment.NewLine + 1559 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1560 "Expected: [[True, False]]" + Environment.NewLine + 1576 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1577 "Expected: [[True, False]]" + Environment.NewLine + 1657 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 1658 "Expected: Not null" + Environment.NewLine + 1694 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1695 "Expected: Not [\"@\", \"a\", \"ab\", \"b\"]" + Environment.NewLine + 1710 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1711 "Expected: Not [[\"@\", \"a\"], [\"ab\", \"b\"]]" + Environment.NewLine + 1745 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1746 $"Expected: Not int[] [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 1783 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1784 "Expected: Not int[] [1, 2, 3, 4, 5]" + Environment.NewLine + 1811 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 1812 " ↓ (pos 0)" + Environment.NewLine + 1813 "Expected: Not [1, 2]" + Environment.NewLine + 1814 "Actual: [1, 2]" + Environment.NewLine + 1847 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1848 "Expected: Not [EquatableObject { Char = 'a' }]" + Environment.NewLine + 1893 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 1894 "Expected: Not int[] [1, 2, 3, 4, 5]" + Environment.NewLine + 1913 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 1914 " ↓ (pos 0)" + Environment.NewLine + 1915 "Expected: Not [1, 2]" + Environment.NewLine + 1916 "Actual: [1, 2]" + Environment.NewLine + 1936 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 1937 "Expected: Not [[\"a\"] = 1, [\"b\"] = 2, [\"c\"] = 3]" + Environment.NewLine + 1953 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 1954 "Expected: Not [[\"a\"] = 1, [\"b\"] = 2, [\"c\"] = 3]" + Environment.NewLine + 2022 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 2023 "Expected: Not [[\"toAddresses\"] = [\"test1@example.com\"], [\"ccAddresses\"] = [\"test2@example.com\"]]" + Environment.NewLine + 2061 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 2062 "Expected: Not [[\"Key1\"] = EquatableObject { Char = 'a' }]" + Environment.NewLine + 2119 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 2120 "Expected: Not [[\"key\"] = [[\"key\"] = [[[\"key\"] = [\"value\"]]]]]" + Environment.NewLine + 2172 "Assert.NotEqual() Failure: HashSets are equal" + Environment.NewLine + 2173 "Expected: Not [42, 2112]" + Environment.NewLine + 2194 "Assert.NotEqual() Failure: HashSets are equal" + Environment.NewLine + 2195 "Expected: Not [[True, False]]" + Environment.NewLine + 2215 "Assert.NotEqual() Failure: HashSets are equal" + Environment.NewLine + 2216 "Expected: Not [[True, False]]" + Environment.NewLine + 2314 "Assert.Single() Failure: The collection contained 2 items" + Environment.NewLine + 2329 "Assert.Single() Failure: The collection contained 7 items" + Environment.NewLine + 2369 "Assert.Single() Failure: The collection did not contain any matching items" + Environment.NewLine + 2370 "Expected: \"foo\"" + Environment.NewLine + 2385 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 2386 "Expected: \"Hello\"" + Environment.NewLine + 2387 "Collection: [\"Hello\", \"World\", \"Hello\"]" + Environment.NewLine + 2402 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 2403 "Expected: 4" + Environment.NewLine + 2404 $"Collection: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 2449 "Assert.Single() Failure: The collection contained 2 items" + Environment.NewLine + 2464 "Assert.Single() Failure: The collection contained 7 items" + Environment.NewLine + 2489 "Assert.Single() Failure: The collection contained 5 items" + Environment.NewLine + 2524 "Assert.Single() Failure: The collection did not contain any matching items" + Environment.NewLine + 2525 "Expected: (predicate expression)" + Environment.NewLine + 2540 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 2541 "Expected: (predicate expression)" + Environment.NewLine + 2542 "Collection: [\"Hello\", \"World\"]" + Environment.NewLine + 2557 "Assert.Single() Failure: The collection contained 2 matching items" + Environment.NewLine + 2558 "Expected: (predicate expression)" + Environment.NewLine + 2559 $"Collection: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 2584 "Assert.Single() Failure: The collection did not contain any matching items" + Environment.NewLine + 2585 "Expected: (predicate expression)" + Environment.NewLine +
DictionaryAssertsTests.cs (4)
47 "Assert.Contains() Failure: Key not found in dictionary" + Environment.NewLine + 48 "Keys: [\"eleventeen\"]" + Environment.NewLine + 99 "Assert.DoesNotContain() Failure: Key found in dictionary" + Environment.NewLine + 100 "Keys: [\"forty-two\"]" + Environment.NewLine +
EqualityAssertsTests.cs (307)
30 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 31 "Expected: 42" + Environment.NewLine + 42 $"This is a long{Environment.NewLine}string with{Environment.NewLine}new lines", 43 $"This is a long{Environment.NewLine}string with embedded{Environment.NewLine}new lines" 49 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 50 "Expected: This is a long" + Environment.NewLine + 51 " string with" + Environment.NewLine + 52 " new lines" + Environment.NewLine + 53 "Actual: This is a long" + Environment.NewLine + 54 " string with embedded" + Environment.NewLine + 82 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 83 "Expected: 42" + Environment.NewLine + 110 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 111 "Expected: 42" + Environment.NewLine + 133 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 134 "Expected: [1, 2]" + Environment.NewLine + 171 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 172 "Expected: 42" + Environment.NewLine + 185 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 186 "Expected: 42" + Environment.NewLine + 206 "Assert.Equal() Failure: Exception thrown during comparison" + Environment.NewLine + 207 "Expected: [1, 2]" + Environment.NewLine + 237 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 238 "Expected: SpyComparable { CompareCalled = True }" + Environment.NewLine + 267 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 268 "Expected: MultiComparable { Value = 1 }" + Environment.NewLine + 301 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 302 "Expected: MultiComparable { Value = 1 }" + Environment.NewLine + 332 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 333 "Expected: SpyComparable_Generic { CompareCalled = True }" + Environment.NewLine + 358 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 359 "Expected: ComparableSubClassA { Value = 1 }" + Environment.NewLine + 384 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 385 "Expected: ComparableBaseClass { Value = 1 }" + Environment.NewLine + 410 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 411 "Expected: ComparableSubClassA { Value = 1 }" + Environment.NewLine + 440 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 441 "Expected: ComparableThrower { Value = 1 }" + Environment.NewLine + 475 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 476 "Expected: ImplicitIComparableExpected { Value = 1 }" + Environment.NewLine + 505 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 506 "Expected: ExplicitIComparableActual { Value = 1 }" + Environment.NewLine + 531 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 532 "Expected: IComparableActualThrower { Value = 1 }" + Environment.NewLine + 560 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 561 "Expected: NonComparableObject { }" + Environment.NewLine + 592 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 593 "Expected: SpyEquatable { Equals__Called = True, Equals_Other = SpyEquatable { Equals__Called = False, Equals_Other = null } }" + Environment.NewLine + 618 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 619 "Expected: EquatableSubClassA { Value = 1 }" + Environment.NewLine + 644 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 645 "Expected: EquatableBaseClass { Value = 1 }" + Environment.NewLine + 670 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 671 "Expected: EquatableSubClassA { Value = 1 }" + Environment.NewLine + 700 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 701 "Expected: ImplicitIEquatableExpected { Value = 1 }" + Environment.NewLine + 730 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 731 "Expected: ExplicitIEquatableExpected { Value = 1 }" + Environment.NewLine + 767 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 768 "Expected: Tuple (StringWrapper { Value = \"a\" })" + Environment.NewLine + 802 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 803 "Expected: Tuple (null)" + Environment.NewLine + 826 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 827 "Expected: Tuple (StringWrapper { Value = \"a\" })" + Environment.NewLine + 863 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 864 " ↓ (pos 0)" + Environment.NewLine + 865 "Expected: string[] [\"foo\", \"bar\"]" + Environment.NewLine + 866 "Actual: ReadOnlyCollection<string> [\"bar\", \"foo\"]" + Environment.NewLine + 895 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 896 " ↓ (pos 0)" + Environment.NewLine + 897 "Expected: [[[1]]]" + Environment.NewLine + 898 "Actual: [[[2]]]" + Environment.NewLine + 926 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 927 " ↓ (pos 1)" + Environment.NewLine + 928 "Expected: string[] [\"foo\", \"bar\"]" + Environment.NewLine + 929 "Actual: object[] [\"foo\", \"baz\"]" + Environment.NewLine + 960 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 961 "Expected: [1, 2]" + Environment.NewLine + 990 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 991 "Expected: int[*] [42]" + Environment.NewLine + 1009 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1010 " ↓ (pos 2)" + Environment.NewLine + 1011 "Expected: [1, 2, 3, 4, 5]" + Environment.NewLine + 1012 "Actual: [1, 2, 0, 4, 5]" + Environment.NewLine + 1032 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1033 "Expected: [1, 2, 3, 4, 5]" + Environment.NewLine + 1046 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1047 $"Expected: UnsafeEnumerable [{ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 1091 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1092 "Expected: [42, 2112]" + Environment.NewLine + 1144 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1145 "Expected: [[\"foo\"] = \"bar\"]" + Environment.NewLine + 1178 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1179 "Expected: Dictionary<string, string> [[\"foo\"] = \"bar\"]" + Environment.NewLine + 1208 "Assert.Equal() Failure: Dictionaries differ" + Environment.NewLine + 1209 "Expected: [[\"two\"] = null]" + Environment.NewLine + 1237 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1238 "Expected: [1, 2, 3]" + Environment.NewLine + 1263 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1264 "Expected: [1, 2, 3]" + Environment.NewLine + 1280 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1281 "Expected: [1, 2, 3]" + Environment.NewLine + 1297 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1298 "Expected: [1, 2]" + Environment.NewLine + 1327 "Assert.Equal() Failure: HashSets differ" + Environment.NewLine + 1328 "Expected: HashSet<int> [42]" + Environment.NewLine + 1383 "Assert.Equal() Failure: Sets differ" + Environment.NewLine + 1384 "Expected: [\"bar\", \"foo\"]" + Environment.NewLine + 1422 "Assert.Equal() Failure: Sets differ" + Environment.NewLine + 1423 "Expected: [\"bar\", \"foo\"]" + Environment.NewLine + 1448 "Assert.Equal() Failure: Sets differ" + Environment.NewLine + 1449 "Expected: [\"bar\"]" + Environment.NewLine + 1487 "Assert.Equal() Failure: Sets differ" + Environment.NewLine + 1488 "Expected: NonGenericSet [\"bar\"]" + Environment.NewLine + 1526 "Assert.Equal() Failure: Sets differ" + Environment.NewLine + 1527 "Expected: [\"foo\", \"bar\"]" + Environment.NewLine + 1585 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 1586 "Expected: [[\"Key1\", \"Key2\"]] = 42" + Environment.NewLine + 1613 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 1614 "Expected: [\"Key1\"] = [\"Value1a\", \"Value1b\"]" + Environment.NewLine + 1643 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 1644 "Expected: [EquatableObject { Char = 'a' }] = 42" + Environment.NewLine + 1673 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 1674 "Expected: [\"Key1\"] = EquatableObject { Char = 'a' }" + Environment.NewLine + 1710 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 1711 $"Expected: [{ArgumentFormatter.Ellipsis}, 2, 3, 4, 5]" + Environment.NewLine + 1712 $"Actual: [{ArgumentFormatter.Ellipsis}, 2, 3, 4, 5, 6]" + Environment.NewLine + 1747 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1748 $"Expected: {ArgumentFormatter.Format(expected)}" + Environment.NewLine + 1785 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1786 $"Expected: {ArgumentFormatter.Format(date1)}" + Environment.NewLine + 1796 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1797 $"Expected: {ArgumentFormatter.Format(date2)}" + Environment.NewLine + 1833 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1834 $"Expected: {ArgumentFormatter.Format(expected)}" + Environment.NewLine + 1866 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1867 $"Expected: {ArgumentFormatter.Format(expected)}" + Environment.NewLine + 1904 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1905 $"Expected: {ArgumentFormatter.Format(date1)}" + Environment.NewLine + 1915 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1916 $"Expected: {ArgumentFormatter.Format(date2)}" + Environment.NewLine + 1953 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1954 $"Expected: {ArgumentFormatter.Format(date1)}" + Environment.NewLine + 1964 $"Assert.Equal() Failure: Values differ" + Environment.NewLine + 1965 $"Expected: {ArgumentFormatter.Format(date2)}" + Environment.NewLine + 1992 "Assert.Equal() Failure: Values differ" + Environment.NewLine + 1993 $"Expected: {0.111M} (rounded from {0.11111M})" + Environment.NewLine + 2021 "Assert.Equal() Failure: Values are not within 3 decimal places" + Environment.NewLine + 2022 $"Expected: {0.111:G17} (rounded from {0.11111:G17})" + Environment.NewLine + 2048 $"Assert.Equal() Failure: Values are not within 4 decimal places" + Environment.NewLine + 2049 $"Expected: {0.1111:G17} (rounded from {0.11113:G17})" + Environment.NewLine + 2085 $"Assert.Equal() Failure: Values are not within tolerance {0.00001:G17}" + Environment.NewLine + 2086 $"Expected: {0.11113:G17}" + Environment.NewLine + 2109 $"Assert.Equal() Failure: Values are not within tolerance {20000000.0:G17}" + Environment.NewLine + 2110 $"Expected: {20210102.2208:G17}" + Environment.NewLine + 2133 $"Assert.Equal() Failure: Values are not within tolerance {1.0:G17}" + Environment.NewLine + 2134 $"Expected: {double.PositiveInfinity}" + Environment.NewLine + 2151 $"Assert.Equal() Failure: Values are not within tolerance {1.0:G17}" + Environment.NewLine + 2152 $"Expected: {0.0:G17}" + Environment.NewLine + 2181 "Assert.Equal() Failure: Values are not within 3 decimal places" + Environment.NewLine + 2182 $"Expected: {0.111:G9} (rounded from {0.11111f:G9})" + Environment.NewLine + 2208 "Assert.Equal() Failure: Values are not within 4 decimal places" + Environment.NewLine + 2209 $"Expected: {0.1111:G9} (rounded from {0.111133f:G9})" + Environment.NewLine + 2245 $"Assert.Equal() Failure: Values are not within tolerance {0.00001f:G9}" + Environment.NewLine + 2246 $"Expected: {0.11113f:G9}" + Environment.NewLine + 2269 $"Assert.Equal() Failure: Values are not within tolerance {20000000.0f:G9}" + Environment.NewLine + 2270 $"Expected: {20210102.2208f:G9}" + Environment.NewLine + 2293 $"Assert.Equal() Failure: Values are not within tolerance {1.0f:G9}" + Environment.NewLine + 2294 $"Expected: {float.PositiveInfinity}" + Environment.NewLine + 2311 $"Assert.Equal() Failure: Values are not within tolerance {1.0f:G9}" + Environment.NewLine + 2312 $"Expected: {0.0f:G9}" + Environment.NewLine + 2331 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2332 "Expected: Not 42" + Environment.NewLine + 2360 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2361 "Expected: Not 42" + Environment.NewLine + 2394 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2395 "Expected: Not 42" + Environment.NewLine + 2417 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2418 "Expected: Not [1, 2]" + Environment.NewLine + 2440 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2441 "Expected: Not \"42\"" + Environment.NewLine + 2472 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2473 "Expected: Not 42" + Environment.NewLine + 2492 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2493 "Expected: Not 42" + Environment.NewLine + 2513 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2514 "Expected: Not [1, 2]" + Environment.NewLine + 2528 "Assert.NotEqual() Failure: Exception thrown during comparison" + Environment.NewLine + 2529 "Expected: Not \"42\"" + Environment.NewLine + 2549 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2550 "Expected: Not SpyComparable { CompareCalled = True }" + Environment.NewLine + 2578 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2579 "Expected: Not MultiComparable { Value = 1 }" + Environment.NewLine + 2613 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2614 "Expected: Not MultiComparable { Value = 1 }" + Environment.NewLine + 2644 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2645 "Expected: Not SpyComparable_Generic { CompareCalled = True }" + Environment.NewLine + 2671 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2672 "Expected: Not ComparableSubClassA { Value = 1 }" + Environment.NewLine + 2697 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2698 "Expected: Not ComparableBaseClass { Value = 1 }" + Environment.NewLine + 2723 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2724 "Expected: Not ComparableSubClassA { Value = 1 }" + Environment.NewLine + 2751 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2752 "Expected: Not ComparableThrower { Value = 1 }" + Environment.NewLine + 2788 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2789 "Expected: Not ImplicitIComparableExpected { Value = 1 }" + Environment.NewLine + 2818 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2819 "Expected: Not ExplicitIComparableActual { Value = 1 }" + Environment.NewLine + 2844 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2845 "Expected: Not IComparableActualThrower { Value = 1 }" + Environment.NewLine + 2873 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2874 "Expected: Not NonComparableObject { }" + Environment.NewLine + 2902 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2903 "Expected: Not SpyEquatable { Equals__Called = True, Equals_Other = SpyEquatable { Equals__Called = False, Equals_Other = null } }" + Environment.NewLine + 2931 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2932 "Expected: Not EquatableSubClassA { Value = 1 }" + Environment.NewLine + 2957 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2958 "Expected: Not EquatableBaseClass { Value = 1 }" + Environment.NewLine + 2983 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 2984 "Expected: Not EquatableSubClassA { Value = 1 }" + Environment.NewLine + 3013 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3014 "Expected: Not ImplicitIEquatableExpected { Value = 1 }" + Environment.NewLine + 3043 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3044 "Expected: Not ExplicitIEquatableExpected { Value = 1 }" + Environment.NewLine + 3078 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3079 "Expected: Not Tuple (StringWrapper { Value = \"a\" })" + Environment.NewLine + 3113 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3114 "Expected: Not Tuple (null)" + Environment.NewLine + 3162 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3163 "Expected: Not string[] [\"foo\", \"bar\"]" + Environment.NewLine + 3193 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3194 "Expected: Not [[[1]]]" + Environment.NewLine + 3221 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3222 "Expected: Not string[] [\"foo\", \"bar\"]" + Environment.NewLine + 3254 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3255 "Expected: Not [1, 2]" + Environment.NewLine + 3283 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3284 "Expected: Not [42]" + Environment.NewLine + 3311 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3312 "Expected: Not [42, 2112]" + Environment.NewLine + 3362 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 3363 "Expected: Not [[\"foo\"] = \"bar\"]" + Environment.NewLine + 3397 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3398 "Expected: Not Dictionary<string, string> [[\"foo\"] = \"bar\"]" + Environment.NewLine + 3428 "Assert.NotEqual() Failure: Dictionaries are equal" + Environment.NewLine + 3429 "Expected: Not [[\"two\"] = null]" + Environment.NewLine + 3457 "Assert.NotEqual() Failure: HashSets are equal" + Environment.NewLine + 3458 "Expected: Not [1, 2, 3]" + Environment.NewLine + 3483 "Assert.NotEqual() Failure: HashSets are equal" + Environment.NewLine + 3484 "Expected: Not [1, 2, 3]" + Environment.NewLine + 3511 "Assert.NotEqual() Failure: Sets are equal" + Environment.NewLine + 3512 "Expected: Not HashSet<string> [\"bar\", \"foo\"]" + Environment.NewLine + 3569 "Assert.NotEqual() Failure: Sets are equal" + Environment.NewLine + 3570 "Expected: Not [\"bar\", \"foo\"]" + Environment.NewLine + 3608 "Assert.NotEqual() Failure: Sets are equal" + Environment.NewLine + 3609 "Expected: Not [\"bar\", \"foo\"]" + Environment.NewLine + 3660 "Assert.NotEqual() Failure: Sets are equal" + Environment.NewLine + 3661 "Expected: Not NonGenericSet [\"bar\"]" + Environment.NewLine + 3699 "Assert.NotEqual() Failure: Sets are equal" + Environment.NewLine + 3700 "Expected: Not [\"foo\", \"bar\"]" + Environment.NewLine + 3757 @"Assert.NotEqual() Failure: Strings are equal" + Environment.NewLine + 3758 @"Expected: Not ""actual""" + Environment.NewLine + 3782 "Assert.NotEqual() Failure: Strings are equal" + Environment.NewLine + 3783 @"Expected: Not ""This is a long string so that we can test truncati""···" + Environment.NewLine + 3803 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3804 "Expected: Not [[\"Key1\", \"Key2\"]] = 42" + Environment.NewLine + 3831 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3832 "Expected: Not [\"Key1\"] = [\"Value1a\", \"Value1b\"]" + Environment.NewLine + 3862 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3863 "Expected: Not [EquatableObject { Char = 'a' }] = 42" + Environment.NewLine + 3892 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3893 "Expected: Not [\"Key1\"] = EquatableObject { Char = 'a' }" + Environment.NewLine + 3929 "Assert.NotEqual() Failure: Collections are equal" + Environment.NewLine + 3930 "Expected: Not [1, 2, 3, 4, 5]" + Environment.NewLine + 3960 "Assert.NotEqual() Failure: Values are equal" + Environment.NewLine + 3961 $"Expected: Not {0.11M} (rounded from {0.11111})" + Environment.NewLine + 3989 "Assert.NotEqual() Failure: Values are within 2 decimal places" + Environment.NewLine + 3990 $"Expected: Not {0.11:G17} (rounded from {0.11111:G17})" + Environment.NewLine + 4016 $"Assert.NotEqual() Failure: Values are within 2 decimal places" + Environment.NewLine + 4017 $"Expected: Not {10.57:G17} (rounded from {10.565:G17})" + Environment.NewLine + 4053 $"Assert.NotEqual() Failure: Values are within tolerance {0.01:G17}" + Environment.NewLine + 4054 $"Expected: Not {10.566:G17}" + Environment.NewLine + 4077 $"Assert.NotEqual() Failure: Values are within tolerance {1000.0:G17}" + Environment.NewLine + 4078 $"Expected: Not {double.NaN}" + Environment.NewLine + 4101 $"Assert.NotEqual() Failure: Values are within tolerance {double.PositiveInfinity}" + Environment.NewLine + 4102 $"Expected: Not {double.MinValue:G17}" + Environment.NewLine + 4137 "Assert.NotEqual() Failure: Values are within 2 decimal places" + Environment.NewLine + 4138 $"Expected: Not {0.11:G9} (rounded from {0.11111f:G9})" + Environment.NewLine + 4164 "Assert.NotEqual() Failure: Values are within 2 decimal places" + Environment.NewLine + 4165 $"Expected: Not {10.57:G9} (rounded from {10.5655f:G9})" + Environment.NewLine + 4201 $"Assert.NotEqual() Failure: Values are within tolerance {0.01f:G9}" + Environment.NewLine + 4202 $"Expected: Not {10.569f:G9}" + Environment.NewLine + 4225 $"Assert.NotEqual() Failure: Values are within tolerance {1000.0f:G9}" + Environment.NewLine + 4226 "Expected: Not NaN" + Environment.NewLine + 4249 $"Assert.NotEqual() Failure: Values are within tolerance {float.PositiveInfinity}" + Environment.NewLine + 4250 $"Expected: Not {float.MinValue:G9}" + Environment.NewLine + 4279 "Assert.NotStrictEqual() Failure: Values are equal" + Environment.NewLine + 4280 @"Expected: Not ""actual""" + Environment.NewLine + 4305 "Assert.NotStrictEqual() Failure: Values are equal" + Environment.NewLine + 4306 "Expected: Not DerivedClass { }" + Environment.NewLine + 4332 "Assert.StrictEqual() Failure: Values differ" + Environment.NewLine + 4333 @"Expected: ""bob""" + Environment.NewLine + 4346 "Assert.StrictEqual() Failure: Values differ" + Environment.NewLine + 4347 $"Expected: [{ArgumentFormatter.Ellipsis}]" + Environment.NewLine +
EquivalenceAssertsTests.cs (132)
33 "Assert.Equivalent() Failure" + Environment.NewLine + 34 $"Expected: {expected ?? "null"}" + Environment.NewLine + 65 "Assert.Equivalent() Failure" + Environment.NewLine + 66 "Expected: 12" + Environment.NewLine + 93 "Assert.Equivalent() Failure" + Environment.NewLine + 94 "Expected: 1" + Environment.NewLine + 108 "Assert.Equivalent() Failure" + Environment.NewLine + 109 "Expected: 1" + Environment.NewLine + 137 "Assert.Equivalent() Failure" + Environment.NewLine + 138 "Expected: 42" + Environment.NewLine + 166 "Assert.Equivalent() Failure: Mismatched value on member 'Shallow.Value1'" + Environment.NewLine + 167 "Expected: 42" + Environment.NewLine + 189 "Assert.Equivalent() Failure" + Environment.NewLine + 190 "Expected: \"Hello, world\"" + Environment.NewLine + 203 "Assert.Equivalent() Failure" + Environment.NewLine + 204 "Expected: null" + Environment.NewLine + 226 "Assert.Equivalent() Failure: Mismatched value on member 'x'" + Environment.NewLine + 227 "Expected: 42" + Environment.NewLine + 249 "Assert.Equivalent() Failure: Mismatched value on member 'x.y'" + Environment.NewLine + 250 "Expected: 42" + Environment.NewLine + 281 "Assert.Equivalent() Failure: Mismatched value on member 'x'" + Environment.NewLine + 282 "Expected: 42" + Environment.NewLine + 304 "Assert.Equivalent() Failure: Mismatched value on member 'x.y'" + Environment.NewLine + 305 "Expected: 2600" + Environment.NewLine + 353 "Assert.Equivalent() Failure: Mismatched value on member 'Value1'" + Environment.NewLine + 354 "Expected: 42" + Environment.NewLine + 382 "Assert.Equivalent() Failure: Mismatched value on member 'Shallow.Value1'" + Environment.NewLine + 383 "Expected: 42" + Environment.NewLine + 411 "Assert.Equivalent() Failure: Mismatched value on member 'Value1'" + Environment.NewLine + 412 "Expected: 42" + Environment.NewLine + 440 "Assert.Equivalent() Failure: Mismatched value on member 'Shallow.Value1'" + Environment.NewLine + 441 "Expected: 42" + Environment.NewLine + 469 "Assert.Equivalent() Failure: Mismatched value on member 'Shallow.Value2'" + Environment.NewLine + 470 "Expected: \"Hello, world\"" + Environment.NewLine + 515 "Assert.Equivalent() Failure: Mismatched member list" + Environment.NewLine + 516 "Expected: [\"x\", \"y\"]" + Environment.NewLine + 536 "Assert.Equivalent() Failure: Mismatched member list" + Environment.NewLine + 537 "Expected: [\"x.y\"]" + Environment.NewLine + 560 "Assert.Equivalent() Failure: Mismatched member list" + Environment.NewLine + 561 "Expected: [\"x\"]" + Environment.NewLine + 592 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 593 "Expected: 6" + Environment.NewLine + 609 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 610 "Expected: 6" + Environment.NewLine + 641 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 642 "Expected: 6" + Environment.NewLine + 655 "Assert.Equivalent() Failure: Extra values found" + Environment.NewLine + 656 "Expected: [1, 9, 4]" + Environment.NewLine + 672 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 673 "Expected: 6" + Environment.NewLine + 689 "Assert.Equivalent() Failure: Extra values found in member 'x'" + Environment.NewLine + 690 "Expected: [1, 9, 4]" + Environment.NewLine + 723 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 724 "Expected: 6" + Environment.NewLine + 740 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 741 "Expected: 6" + Environment.NewLine + 772 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 773 "Expected: 6" + Environment.NewLine + 786 "Assert.Equivalent() Failure: Extra values found" + Environment.NewLine + 787 "Expected: [1, 9, 4]" + Environment.NewLine + 803 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 804 "Expected: 6" + Environment.NewLine + 820 "Assert.Equivalent() Failure: Extra values found in member 'x'" + Environment.NewLine + 821 "Expected: [1, 9, 4]" + Environment.NewLine + 860 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 861 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 877 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 878 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 915 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 916 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 932 "Assert.Equivalent() Failure: Extra values found" + Environment.NewLine + 933 "Expected: [{ Foo = \"Bar\" }]" + Environment.NewLine + 949 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 950 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 966 "Assert.Equivalent() Failure: Extra values found in member 'x'" + Environment.NewLine + 967 "Expected: [{ Foo = \"Bar\" }]" + Environment.NewLine + 1004 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1005 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 1021 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 1022 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 1059 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1060 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 1076 "Assert.Equivalent() Failure: Extra values found" + Environment.NewLine + 1077 "Expected: [{ Foo = \"Bar\" }]" + Environment.NewLine + 1093 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 1094 "Expected: { Foo = \"Biff\" }" + Environment.NewLine + 1110 "Assert.Equivalent() Failure: Extra values found in member 'x'" + Environment.NewLine + 1111 "Expected: [{ Foo = \"Bar\" }]" + Environment.NewLine + 1201 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1202 "Expected: [\"Foo\"] = 16" + Environment.NewLine + 1218 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1219 "Expected: [\"Foo\"] = [16]" + Environment.NewLine + 1235 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1236 "Expected: [\"Foo\"] = [16]" + Environment.NewLine + 1252 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 1253 "Expected: [\"Foo\"] = 16" + Environment.NewLine + 1290 "Assert.Equivalent() Failure: Collection value not found" + Environment.NewLine + 1291 "Expected: [\"Foo\"] = 16" + Environment.NewLine + 1307 "Assert.Equivalent() Failure: Extra values found" + Environment.NewLine + 1308 "Expected: [[\"Bar\"] = 2112, [\"Foo\"] = 42]" + Environment.NewLine + 1324 "Assert.Equivalent() Failure: Collection value not found in member 'x'" + Environment.NewLine + 1325 "Expected: [\"Foo\"] = 16" + Environment.NewLine + 1341 "Assert.Equivalent() Failure: Extra values found in member 'x'" + Environment.NewLine + 1342 "Expected: [[\"Bar\"] = 2112, [\"Foo\"] = 42]" + Environment.NewLine + 1370 "Assert.Equivalent() Failure: Mismatched value on member 'Key'" + Environment.NewLine + 1371 "Expected: 42" + Environment.NewLine + 1387 "Assert.Equivalent() Failure: Collection value not found in member 'Value'" + Environment.NewLine + 1388 "Expected: 6" + Environment.NewLine + 1416 "Assert.Equivalent() Failure: Mismatched value on member 'Key'" + Environment.NewLine + 1417 "Expected: 42" + Environment.NewLine + 1433 "Assert.Equivalent() Failure: Collection value not found in member 'Value'" + Environment.NewLine + 1434 "Expected: 6" + Environment.NewLine + 1464 "Assert.Equivalent() Failure" + Environment.NewLine + 1465 "Expected: 2022-12-01T01:03:01.0000000" + Environment.NewLine + 1481 "Assert.Equivalent() Failure" + Environment.NewLine + 1482 "Expected: 2022-12-01T01:03:01.0000000" + Environment.NewLine + 1519 "Assert.Equivalent() Failure" + Environment.NewLine + 1520 "Expected: 2022-12-01T01:03:01.0000000+00:00" + Environment.NewLine + 1555 Assert.StartsWith("Assert.Equivalent() Failure: Mismatched value on member 'FullName'" + Environment.NewLine, ex.Message); 1577 Assert.StartsWith("Assert.Equivalent() Failure: Mismatched value on member 'FullName'" + Environment.NewLine, ex.Message); 1591 "Assert.Equivalent() Failure: Types did not match" + Environment.NewLine + 1592 "Expected type: System.IO.FileInfo" + Environment.NewLine + 1609 "Assert.Equivalent() Failure: Types did not match in member 'Info'" + Environment.NewLine + 1610 "Expected type: System.IO.FileInfo" + Environment.NewLine + 1701 "Assert.Equivalent() Failure: Mismatched value on member 'Value'" + Environment.NewLine + 1702 "Expected: \"Hello\"" + Environment.NewLine + 1730 "Assert.Equivalent() Failure: Mismatched value on member 'Item1'" + Environment.NewLine + 1731 "Expected: 42" + Environment.NewLine + 1759 "Assert.Equivalent() Failure: Mismatched value on member 'Item1'" + Environment.NewLine + 1760 "Expected: 42" + Environment.NewLine + 1807 "Assert.Equivalent() Failure: Mismatched value on member 'Value'" + Environment.NewLine + 1808 "Expected: \"42\"" + Environment.NewLine +
EventAssertsTests.cs (28)
25 "Assert.Raises() Failure: No event was raised" + Environment.NewLine + 26 "Expected: typeof(object)" + Environment.NewLine + 82 "Assert.Raises() Failure: Wrong event type was raised" + Environment.NewLine + 83 "Expected: typeof(object)" + Environment.NewLine + 107 "Assert.Raises() Failure: No event was raised" + Environment.NewLine + 108 "Expected: typeof(object)" + Environment.NewLine + 147 "Assert.Raises() Failure: Wrong event type was raised" + Environment.NewLine + 148 "Expected: typeof(object)" + Environment.NewLine + 192 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 193 "Expected: typeof(object)" + Environment.NewLine + 251 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 252 "Expected: typeof(object)" + Environment.NewLine + 273 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 274 "Expected: typeof(System.EventArgs)" + Environment.NewLine + 366 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 367 "Expected: typeof(object)" + Environment.NewLine + 425 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 426 "Expected: typeof(object)" + Environment.NewLine + 447 "Assert.RaisesAny() Failure: No event was raised" + Environment.NewLine + 448 "Expected: typeof(System.EventArgs)" + Environment.NewLine + 540 "Assert.Raises() Failure: No event was raised" + Environment.NewLine + 541 "Expected: typeof(object)" + Environment.NewLine + 597 "Assert.Raises() Failure: Wrong event type was raised" + Environment.NewLine + 598 "Expected: typeof(object)" + Environment.NewLine + 622 "Assert.Raises() Failure: No event was raised" + Environment.NewLine + 623 "Expected: typeof(object)" + Environment.NewLine + 662 "Assert.Raises() Failure: Wrong event type was raised" + Environment.NewLine + 663 "Expected: typeof(object)" + Environment.NewLine +
ExceptionAssertsTests.cs (58)
31 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 56 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 57 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 74 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 75 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 114 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 139 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 140 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 157 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 158 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 187 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 212 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 213 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 230 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 231 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 267 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 292 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 293 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 310 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 311 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 339 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 363 "Assert.Throws() Failure: Incorrect parameter name" + Environment.NewLine + 364 "Exception: typeof(System.ArgumentException)" + Environment.NewLine + 365 "Expected: \"paramName2\"" + Environment.NewLine + 381 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 382 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 399 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 400 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 425 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 449 "Assert.Throws() Failure: Incorrect parameter name" + Environment.NewLine + 450 "Exception: typeof(System.ArgumentException)" + Environment.NewLine + 451 "Expected: \"paramName2\"" + Environment.NewLine + 467 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 468 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 485 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 486 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 514 "Assert.ThrowsAny() Failure: No exception was thrown" + Environment.NewLine + 539 "Assert.ThrowsAny() Failure: Exception type was not compatible" + Environment.NewLine + 540 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 584 "Assert.ThrowsAny() Failure: No exception was thrown" + Environment.NewLine + 609 "Assert.ThrowsAny() Failure: Exception type was not compatible" + Environment.NewLine + 610 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 644 "Assert.ThrowsAny() Failure: No exception was thrown" + Environment.NewLine + 669 "Assert.ThrowsAny() Failure: Exception type was not compatible" + Environment.NewLine + 670 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 703 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 728 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 729 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 746 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 747 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 772 "Assert.Throws() Failure: No exception was thrown" + Environment.NewLine + 796 "Assert.Throws() Failure: Incorrect parameter name" + Environment.NewLine + 797 "Exception: typeof(System.ArgumentException)" + Environment.NewLine + 798 "Expected: \"paramName2\"" + Environment.NewLine + 814 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 815 "Expected: typeof(System.ArgumentException)" + Environment.NewLine + 832 "Assert.Throws() Failure: Exception type was not an exact match" + Environment.NewLine + 833 "Expected: typeof(System.ArgumentException)" + Environment.NewLine +
IdentityAssertsTests.cs (2)
44 "Assert.Same() Failure: Values are not the same instance" + Environment.NewLine + 45 "Expected: \"bob\"" + Environment.NewLine +
MemoryAssertsTests.cs (80)
34 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 35 "String: \"Hello, world!\"" + Environment.NewLine + 48 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 49 "String: \"Hello, world!\"" + Environment.NewLine + 74 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 75 "String: \"\"" + Environment.NewLine + 88 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 89 "String: \"\"" + Environment.NewLine + 107 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 108 "String: \"This is a relatively long string so that \"" + ArgumentFormatter.Ellipsis + Environment.NewLine + 148 "Assert.Contains() Failure: Sub-memory not found" + Environment.NewLine + 149 "Memory: [1, 2, 3, 4, 5, " + ArgumentFormatter.Ellipsis + "]" + Environment.NewLine + 162 "Assert.Contains() Failure: Sub-memory not found" + Environment.NewLine + 163 "Memory: [1, 2, 3, 4, 5, " + ArgumentFormatter.Ellipsis + "]" + Environment.NewLine + 176 "Assert.Contains() Failure: Sub-memory not found" + Environment.NewLine + 177 "Memory: []" + Environment.NewLine + 227 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 228 " ↓ (pos 7)" + Environment.NewLine + 229 "String: \"Hello, world!\"" + Environment.NewLine + 242 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 243 " ↓ (pos 7)" + Environment.NewLine + 244 "String: \"Hello, world!\"" + Environment.NewLine + 257 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 258 " ↓ (pos 7)" + Environment.NewLine + 259 "String: \"Hello, world!\"" + Environment.NewLine + 272 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 273 " ↓ (pos 7)" + Environment.NewLine + 274 "String: \"Hello, world!\"" + Environment.NewLine + 299 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 300 " ↓ (pos 7)" + Environment.NewLine + 301 "String: \"Hello, world from a very long string that\"" + ArgumentFormatter.Ellipsis + Environment.NewLine + 314 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 315 " ↓ (pos 50)" + Environment.NewLine + 316 "String: " + ArgumentFormatter.Ellipsis + "\"ng that has 'Hello, world' placed in the \"" + ArgumentFormatter.Ellipsis + Environment.NewLine + 329 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 330 " ↓ (pos 89)" + Environment.NewLine + 331 "String: " + ArgumentFormatter.Ellipsis + "\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine + 371 "Assert.DoesNotContain() Failure: Sub-memory found" + Environment.NewLine + 372 " ↓ (pos 2)" + Environment.NewLine + 373 "Memory: [1, 2, 3, 4, 5, " + ArgumentFormatter.Ellipsis + "]" + Environment.NewLine + 386 "Assert.DoesNotContain() Failure: Sub-memory found" + Environment.NewLine + 387 " ↓ (pos 2)" + Environment.NewLine + 388 "Memory: [1, 2, 3, 4, 5, " + ArgumentFormatter.Ellipsis + "]" + Environment.NewLine + 409 "Assert.DoesNotContain() Failure: Sub-memory found" + Environment.NewLine + 410 (data.Any() ? " ↓ (pos 0)" + Environment.NewLine : "") + 411 "Memory: " + CollectionTracker<int>.FormatStart(data) + Environment.NewLine + 439 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 440 "String: \"Hello, world!\"" + Environment.NewLine + 461 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 462 "String: \"world!\"" + Environment.NewLine + 492 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 493 "String: \"\"" + Environment.NewLine + 515 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 516 "String: " + ArgumentFormatter.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine + 628 message += Environment.NewLine + " " + expectedPointer; 631 Environment.NewLine + "Expected: " + ArgumentFormatter.Format(expected) + 632 Environment.NewLine + "Actual: " + ArgumentFormatter.Format(actual); 635 message += Environment.NewLine + " " + actualPointer; 663 "Assert.Equal() Failure: Strings differ" + Environment.NewLine + 664 " ↓ (pos 21)" + Environment.NewLine + 665 "Expected: " + ArgumentFormatter.Ellipsis + "\"hy hello there world, you're a long strin\"" + ArgumentFormatter.Ellipsis + Environment.NewLine + 666 "Actual: " + ArgumentFormatter.Ellipsis + "\"hy hello there world! You're a long strin\"" + ArgumentFormatter.Ellipsis + Environment.NewLine + 740 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 741 " ↓ (pos 1)" + Environment.NewLine + 742 "Expected: [1, 0, 2, 3]" + Environment.NewLine + 743 "Actual: [1, 2, 3]" + Environment.NewLine + 764 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 765 "Expected: [1, 2, 3]" + Environment.NewLine + 766 "Actual: [1, 2, 3, 4]" + Environment.NewLine + 820 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 821 "Expected: [\"yes\", \"no\", \"maybe\"]" + Environment.NewLine + 822 "Actual: [\"yes\", \"no\", \"maybe\", \"so\"]" + Environment.NewLine + 856 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 857 "String: \"Hello, world!\"" + Environment.NewLine + 878 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 879 "String: \"world!\"" + Environment.NewLine + 909 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 910 "String: \"\"" + Environment.NewLine + 932 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 933 "String: \"This is the long string that we expected \"" + ArgumentFormatter.Ellipsis + Environment.NewLine +
NullAssertsTests.cs (4)
70 "Assert.Null() Failure: Value is not null" + Environment.NewLine + 71 "Expected: null" + Environment.NewLine + 86 "Assert.Null() Failure: Value of type 'Nullable<int>' has a value" + Environment.NewLine + 87 "Expected: null" + Environment.NewLine +
RangeAssertsTests.cs (18)
21 "Assert.InRange() Failure: Value not in range" + Environment.NewLine + 22 $"Range: ({0.75:G17} - {1.25:G17})" + Environment.NewLine + 41 "Assert.InRange() Failure: Value not in range" + Environment.NewLine + 42 "Range: (1 - 2)" + Environment.NewLine + 55 "Assert.InRange() Failure: Value not in range" + Environment.NewLine + 56 "Range: (0 - 1)" + Environment.NewLine + 75 "Assert.InRange() Failure: Value not in range" + Environment.NewLine + 76 "Range: (\"bob\" - \"scott\")" + Environment.NewLine + 108 "Assert.InRange() Failure: Value not in range" + Environment.NewLine + 109 $"Range: ({0.75:G17} - {1.25:G17})" + Environment.NewLine + 131 "Assert.NotInRange() Failure: Value in range" + Environment.NewLine + 132 $"Range: ({0.75:G17} - {1.25:G17})" + Environment.NewLine + 151 "Assert.NotInRange() Failure: Value in range" + Environment.NewLine + 152 "Range: (1 - 3)" + Environment.NewLine + 171 "Assert.NotInRange() Failure: Value in range" + Environment.NewLine + 172 "Range: (\"adam\" - \"scott\")" + Environment.NewLine + 188 "Assert.NotInRange() Failure: Value in range" + Environment.NewLine + 189 $"Range: ({0.75:G17} - {1.25:G17})" + Environment.NewLine +
SetAssertsTests.cs (24)
42 "Assert.Contains() Failure: Item not found in set" + Environment.NewLine + 43 "Set: [\"eleventeen\"]" + Environment.NewLine + 92 "Assert.DoesNotContain() Failure: Item found in set" + Environment.NewLine + 93 "Set: [\"forty-two\"]" + Environment.NewLine + 130 "Assert.ProperSubset() Failure: Value is not a proper subset" + Environment.NewLine + 131 "Expected: [1, 2, 3]" + Environment.NewLine + 156 "Assert.ProperSubset() Failure: Value is not a proper subset" + Environment.NewLine + 157 "Expected: [1, 2, 3]" + Environment.NewLine + 170 "Assert.ProperSubset() Failure: Value is not a proper subset" + Environment.NewLine + 171 "Expected: []" + Environment.NewLine + 196 "Assert.ProperSuperset() Failure: Value is not a proper superset" + Environment.NewLine + 197 "Expected: [1, 2, 3]" + Environment.NewLine + 222 "Assert.ProperSuperset() Failure: Value is not a proper superset" + Environment.NewLine + 223 "Expected: [1, 2, 3]" + Environment.NewLine + 236 "Assert.ProperSuperset() Failure: Value is not a proper superset" + Environment.NewLine + 237 "Expected: []" + Environment.NewLine + 280 "Assert.Subset() Failure: Value is not a subset" + Environment.NewLine + 281 "Expected: [1, 2, 3]" + Environment.NewLine + 294 "Assert.Subset() Failure: Value is not a subset" + Environment.NewLine + 295 "Expected: []" + Environment.NewLine + 337 "Assert.Superset() Failure: Value is not a superset" + Environment.NewLine + 338 "Expected: [1, 2, 3]" + Environment.NewLine + 351 "Assert.Superset() Failure: Value is not a superset" + Environment.NewLine + 352 "Expected: []" + Environment.NewLine +
SpanAssertsTests.cs (80)
34 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 35 "String: \"Hello, world!\"" + Environment.NewLine + 48 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 49 "String: \"Hello, world!\"" + Environment.NewLine + 74 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 75 "String: \"\"" + Environment.NewLine + 88 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 89 "String: \"\"" + Environment.NewLine + 107 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 108 $"String: \"This is a relatively long string so that \"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 148 "Assert.Contains() Failure: Sub-span not found" + Environment.NewLine + 149 $"Span: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 162 "Assert.Contains() Failure: Sub-span not found" + Environment.NewLine + 163 $"Span: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 176 "Assert.Contains() Failure: Sub-span not found" + Environment.NewLine + 177 "Span: []" + Environment.NewLine + 227 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 228 " ↓ (pos 7)" + Environment.NewLine + 229 "String: \"Hello, world!\"" + Environment.NewLine + 242 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 243 " ↓ (pos 7)" + Environment.NewLine + 244 "String: \"Hello, world!\"" + Environment.NewLine + 257 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 258 " ↓ (pos 7)" + Environment.NewLine + 259 "String: \"Hello, world!\"" + Environment.NewLine + 272 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 273 " ↓ (pos 7)" + Environment.NewLine + 274 "String: \"Hello, world!\"" + Environment.NewLine + 299 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 300 " ↓ (pos 7)" + Environment.NewLine + 301 $"String: \"Hello, world from a very long string that\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 314 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 315 " ↓ (pos 50)" + Environment.NewLine + 316 $"String: {ArgumentFormatter.Ellipsis}\"ng that has 'Hello, world' placed in the \"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 329 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 330 " ↓ (pos 89)" + Environment.NewLine + 331 $"String: {ArgumentFormatter.Ellipsis}\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine + 371 "Assert.DoesNotContain() Failure: Sub-span found" + Environment.NewLine + 372 " ↓ (pos 2)" + Environment.NewLine + 373 $"Span: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 386 "Assert.DoesNotContain() Failure: Sub-span found" + Environment.NewLine + 387 " ↓ (pos 2)" + Environment.NewLine + 388 $"Span: [1, 2, 3, 4, 5, {ArgumentFormatter.Ellipsis}]" + Environment.NewLine + 409 "Assert.DoesNotContain() Failure: Sub-span found" + Environment.NewLine + 410 (data.Any() ? " ↓ (pos 0)" + Environment.NewLine : "") + 411 "Span: " + CollectionTracker<int>.FormatStart(data) + Environment.NewLine + 439 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 440 "String: \"Hello, world!\"" + Environment.NewLine + 461 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 462 "String: \"world!\"" + Environment.NewLine + 492 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 493 "String: \"\"" + Environment.NewLine + 515 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 516 "String: " + ArgumentFormatter.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine + 628 message += Environment.NewLine + " " + expectedPointer; 631 Environment.NewLine + "Expected: " + ArgumentFormatter.Format(expected) + 632 Environment.NewLine + "Actual: " + ArgumentFormatter.Format(actual); 635 message += Environment.NewLine + " " + actualPointer; 663 "Assert.Equal() Failure: Strings differ" + Environment.NewLine + 664 " ↓ (pos 21)" + Environment.NewLine + 665 $"Expected: {ArgumentFormatter.Ellipsis}\"hy hello there world, you're a long strin\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 666 $"Actual: {ArgumentFormatter.Ellipsis}\"hy hello there world! You're a long strin\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 740 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 741 " ↓ (pos 1)" + Environment.NewLine + 742 "Expected: [1, 0, 2, 3]" + Environment.NewLine + 743 "Actual: [1, 2, 3]" + Environment.NewLine + 764 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 765 "Expected: [1, 2, 3]" + Environment.NewLine + 766 "Actual: [1, 2, 3, 4]" + Environment.NewLine + 820 "Assert.Equal() Failure: Collections differ" + Environment.NewLine + 821 "Expected: [\"yes\", \"no\", \"maybe\"]" + Environment.NewLine + 822 "Actual: [\"yes\", \"no\", \"maybe\", \"so\"]" + Environment.NewLine + 856 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 857 "String: \"Hello, world!\"" + Environment.NewLine + 878 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 879 "String: \"world!\"" + Environment.NewLine + 909 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 910 "String: \"\"" + Environment.NewLine + 932 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 933 "String: \"This is the long string that we expected \"" + ArgumentFormatter.Ellipsis + Environment.NewLine +
StringAssertsTests.cs (62)
35 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 36 "String: \"Hello, world!\"" + Environment.NewLine + 64 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 65 "String: \"Hello, world!\"" + Environment.NewLine + 91 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 92 "String: null" + Environment.NewLine + 110 "Assert.Contains() Failure: Sub-string not found" + Environment.NewLine + 111 $"String: \"This is a relatively long string so that \"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 190 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 191 " ↓ (pos 7)" + Environment.NewLine + 192 "String: \"Hello, world!\"" + Environment.NewLine + 226 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 227 " ↓ (pos 7)" + Environment.NewLine + 228 $"String: \"Hello, world from a very long string that\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 256 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 257 " ↓ (pos 50)" + Environment.NewLine + 258 $"String: {ArgumentFormatter.Ellipsis}\"ng that has 'Hello, world' placed in the \"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 286 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 287 " ↓ (pos 89)" + Environment.NewLine + 288 $"String: {ArgumentFormatter.Ellipsis}\"ont truncated, just to say 'Hello, world'\"" + Environment.NewLine + 316 "Assert.DoesNotContain() Failure: Sub-string found" + Environment.NewLine + 317 " ↓ (pos 7)" + Environment.NewLine + 318 "String: \"Hello, world!\"" + Environment.NewLine + 359 "Assert.DoesNotMatch() Failure: Match found" + Environment.NewLine + 360 " ↓ (pos 2)" + Environment.NewLine + 361 "String: \"Hello, world!\"" + Environment.NewLine + 389 "Assert.DoesNotMatch() Failure: Match found" + Environment.NewLine + 390 " ↓ (pos 2)" + Environment.NewLine + 391 "String: \"Hello, world!\"" + Environment.NewLine + 419 "Assert.Empty() Failure: String was not empty" + Environment.NewLine + 453 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 454 "String: \"Hello, world!\"" + Environment.NewLine + 482 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 483 "String: \"world!\"" + Environment.NewLine + 525 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 526 "String: null" + Environment.NewLine + 544 "Assert.EndsWith() Failure: String end does not match" + Environment.NewLine + 545 "String: " + ArgumentFormatter.Ellipsis + "\"at we expected to find this ending inside\"" + Environment.NewLine + 670 message += Environment.NewLine + " " + expectedPointer; 673 Environment.NewLine + "Expected: " + ArgumentFormatter.Format(expected) + 674 Environment.NewLine + "Actual: " + ArgumentFormatter.Format(actual); 677 message += Environment.NewLine + " " + actualPointer; 713 "Assert.Equal() Failure: Strings differ" + Environment.NewLine + 714 " ↓ (pos 21)" + Environment.NewLine + 715 $"Expected: {ArgumentFormatter.Ellipsis}\"hy hello there world, you're a long strin\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 716 $"Actual: {ArgumentFormatter.Ellipsis}\"hy hello there world! You're a long strin\"{ArgumentFormatter.Ellipsis}" + Environment.NewLine + 757 "Assert.Matches() Failure: Pattern not found in value" + Environment.NewLine + 758 @"Regex: ""\\d+""" + Environment.NewLine + 771 "Assert.Matches() Failure: Pattern not found in value" + Environment.NewLine + 772 @"Regex: ""\\d+""" + Environment.NewLine + 806 "Assert.Matches() Failure: Pattern not found in value" + Environment.NewLine + 807 @"Regex: ""\\d+""" + Environment.NewLine + 820 "Assert.Matches() Failure: Pattern not found in value" + Environment.NewLine + 821 @"Regex: ""\\d+""" + Environment.NewLine + 855 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 856 "String: \"Hello, world!\"" + Environment.NewLine + 884 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 885 "String: \"world!\"" + Environment.NewLine + 927 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 928 "String: null" + Environment.NewLine + 946 "Assert.StartsWith() Failure: String start does not match" + Environment.NewLine + 947 "String: \"This is the long string that we expected \"" + ArgumentFormatter.Ellipsis + Environment.NewLine +
TypeAssertsTests.cs (32)
24 "Assert.IsAssignableFrom() Failure: Value is null" + Environment.NewLine + 25 "Expected: typeof(object)" + Environment.NewLine + 75 "Assert.IsAssignableFrom() Failure: Value is an incompatible type" + Environment.NewLine + 76 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 93 "Assert.IsAssignableFrom() Failure: Value is null" + Environment.NewLine + 94 "Expected: typeof(object)" + Environment.NewLine + 144 "Assert.IsAssignableFrom() Failure: Value is an incompatible type" + Environment.NewLine + 145 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 170 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 171 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 186 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 187 "Expected: typeof(System.Exception)" + Environment.NewLine + 202 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 203 "Expected: typeof(System.IDisposable)" + Environment.NewLine + 233 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 234 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 249 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 250 "Expected: typeof(System.Exception)" + Environment.NewLine + 265 "Assert.IsNotAssignableFrom() Failure: Value is a compatible type" + Environment.NewLine + 266 "Expected: typeof(System.IDisposable)" + Environment.NewLine + 296 "Assert.IsNotType() Failure: Value is the exact type" + Environment.NewLine + 297 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 328 "Assert.IsNotType() Failure: Value is the exact type" + Environment.NewLine + 329 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 370 "Assert.IsType() Failure: Value is not the exact type" + Environment.NewLine + 371 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 406 "Assert.IsType() Failure: Value is null" + Environment.NewLine + 407 "Expected: typeof(object)" + Environment.NewLine + 432 "Assert.IsType() Failure: Value is not the exact type" + Environment.NewLine + 433 "Expected: typeof(System.InvalidCastException)" + Environment.NewLine + 468 "Assert.IsType() Failure: Value is null" + Environment.NewLine + 469 "Expected: typeof(object)" + Environment.NewLine +
Microsoft.DotNet.XUnitExtensions (8)
src\Microsoft.DotNet.XUnitExtensions.Shared\CoreClrConfigurationDetection.cs (2)
54Environment.GetEnvironmentVariable("DOTNET_" + name) ?? Environment.GetEnvironmentVariable("COMPlus_" + name) ?? defaultValue;
src\Microsoft.DotNet.XUnitExtensions.Shared\DesktopTraceListener.cs (1)
26base(message + Environment.NewLine + detailMessage)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) ||
src\Microsoft.DotNet.XUnitExtensions.Shared\Discoverers\SkipOnCIDiscoverer.cs (3)
21if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_CI")) || 22!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")) || 23!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AGENT_OS")))
Microsoft.DotNet.XUnitV3Extensions (8)
src\Microsoft.DotNet.XUnitExtensions.Shared\Attributes\SkipOnCIAttribute.cs (3)
27if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_CI")) || 28!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")) || 29!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AGENT_OS")))
src\Microsoft.DotNet.XUnitExtensions.Shared\CoreClrConfigurationDetection.cs (2)
54Environment.GetEnvironmentVariable("DOTNET_" + name) ?? Environment.GetEnvironmentVariable("COMPlus_" + name) ?? defaultValue;
src\Microsoft.DotNet.XUnitExtensions.Shared\DesktopTraceListener.cs (1)
26base(message + Environment.NewLine + detailMessage)
src\Microsoft.DotNet.XUnitExtensions.Shared\DiscovererHelpers.cs (2)
17public static bool IsRunningOnNetCoreApp { get; } = (Environment.Version.Major >= 5 || !RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.OrdinalIgnoreCase)); 31(platforms.HasFlag(TestPlatforms.LinuxBionic) && RuntimeInformation.IsOSPlatform(OSPlatform.Linux) && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ANDROID_STORAGE"))) ||
Microsoft.Extensions.AI (2)
TelemetryHelpers.cs (1)
15Environment.GetEnvironmentVariable(OpenTelemetryConsts.GenAICaptureMessageContentEnvVar) is string envVar &&
ToolReduction\EmbeddingToolReductionStrategy.cs (1)
46return t.Name + Environment.NewLine + t.Description;
Microsoft.Extensions.AI.Abstractions.Tests (4)
ChatCompletion\ChatResponseTests.cs (1)
122ChatResponse response = new(new ChatMessage(ChatRole.Assistant, $"This is a test.{Environment.NewLine}It's multiple lines."));
SpeechToText\SpeechToTextResponseTests.cs (2)
196SpeechToTextResponse response = new("This is a test." + Environment.NewLine + "It's multiple lines."); 197Assert.Equal("This is a test." + Environment.NewLine + "It's multiple lines.", response.ToString());
test\Shared\JsonSchemaExporter\SchemaTestHelpers.cs (1)
47{string.Join(Environment.NewLine, errors)}
Microsoft.Extensions.AI.Evaluation.Console (1)
Commands\ReportCommand.cs (1)
101bool isInteractive = Environment.UserInteractive && (OperatingSystem.IsWindows() || !(isRedirected));
Microsoft.Extensions.AI.Evaluation.Integration.Tests (1)
Setup.cs (1)
15Environment.GetEnvironmentVariable("AITESTING_OFFLINE") == "1";
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
EmbeddingTests.cs (1)
17if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("TF_BUILD")))
Microsoft.Extensions.AI.Evaluation.Safety (2)
ContentSafetyEvaluator.cs (1)
114string.Join(Environment.NewLine, textContents.Select(c => c.Text)) is string contextString &&
ContentSafetyServicePayloadUtilities.cs (1)
135userTextListStrings = [string.Join(Environment.NewLine, userTextListStrings)];
Microsoft.Extensions.AI.Integration.Tests (3)
VerbatimHttpHandler.cs (3)
135$"Expected:{Environment.NewLine}" + 136$"{expected}{Environment.NewLine}" + 137$"Actual:{Environment.NewLine}" +
Microsoft.Extensions.AI.OpenAI (2)
OpenAIClientExtensions.cs (1)
83$"{descriptionNode.GetValue<string>()}{Environment.NewLine}{additionalDescription}" :
OpenAIResponsesChatClient.cs (1)
487$"{result.Instructions}{Environment.NewLine}{instructions}";
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIAssistantChatClientIntegrationTests.cs (1)
81AssistantClient ac = new(Environment.GetEnvironmentVariable("AI:OpenAI:ApiKey")!);
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (1)
419var resultDuplicatedJson = JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options) + Environment.NewLine + JsonSerializer.Serialize(expectedResult, JsonContext2.Default.Options);
Microsoft.Extensions.ApiDescription.Client.Tests (5)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Microsoft.Extensions.Caching.Hybrid.Tests (2)
HybridCacheEventSourceTests.cs (2)
226log.WriteLine($".NET {Environment.Version} on {Environment.OSVersion}, {IntPtr.Size * 8}-bit");
Microsoft.Extensions.Caching.StackExchangeRedis.Tests (5)
Infrastructure\RedisTestConfig.cs (5)
131return (Environment.GetEnvironmentVariable("STARTED_OWN_REDIS_SERVER") != null); 136var configFilePath = Environment.GetEnvironmentVariable("USERPROFILE"); 142var configFilePath = Environment.GetEnvironmentVariable("DOTNET_PACKAGES"); 185+ tempRedisServerFullPath + " with Arguments '" + serverArgs + "', working dir = " + tempPath + Environment.NewLine 186+ _redisServerProcess.StandardError.ReadToEnd() + Environment.NewLine
Microsoft.Extensions.Configuration.EnvironmentVariables (1)
EnvironmentVariablesConfigurationProvider.cs (1)
56Load(Environment.GetEnvironmentVariables());
Microsoft.Extensions.Configuration.KeyPerFile (2)
KeyPerFileConfigurationProvider.cs (2)
46=> value.EndsWith(Environment.NewLine, StringComparison.Ordinal) 47? value.Substring(0, value.Length - Environment.NewLine.Length)
Microsoft.Extensions.Configuration.UserSecrets (7)
PathHelper.cs (7)
61string? appData = Environment.GetEnvironmentVariable("APPDATA"); 63?? Environment.GetEnvironmentVariable("HOME") // On Mac/Linux it goes to ~/.microsoft/usersecrets/ 64?? Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) 65?? Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) 66?? Environment.GetEnvironmentVariable(userSecretsFallbackDir); // this fallback is an escape hatch if everything else fails
Microsoft.Extensions.DataIngestion.Abstractions (1)
IngestionDocumentElement.cs (1)
96=> string.Join(Environment.NewLine, Elements.Select(e => e.GetMarkdown()));
Microsoft.Extensions.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (1)
639Environment.NewLine,
ServiceLookup\DynamicServiceProviderEngine.cs (1)
44Debug.Fail($"We should never get exceptions from the background compilation.{Environment.NewLine}{ex}");
Microsoft.Extensions.DependencyModel (3)
EnvironmentWrapper.cs (1)
15public string? GetEnvironmentVariable(string name) => Environment.GetEnvironmentVariable(name);
Resolution\PackageCompilationAssemblyResolver.cs (2)
59string basePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
Microsoft.Extensions.Diagnostics.ResourceMonitoring (6)
Windows\Interop\ProcessInfo.cs (1)
40return (ulong)Environment.WorkingSet;
Windows\WindowsSnapshotProvider.cs (5)
99var cpuUsage = Environment.CpuUsage; 104memoryUsageInBytes: (ulong)Environment.WorkingSet); 118return Environment.CpuUsage.TotalTime.Ticks; 125internal static int GetCpuUnits() => Environment.ProcessorCount; 129return Environment.WorkingSet;
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (2)
Windows\WindowsSnapshotProviderTests.cs (2)
48Assert.Equal(Environment.ProcessorCount, provider.Resources.GuaranteedCpuUnits); 49Assert.Equal(Environment.ProcessorCount, provider.Resources.MaximumCpuUnits);
Microsoft.Extensions.DotNetDeltaApplier (7)
HotReloadAgent.cs (4)
237Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks, 238RemoveCurrentAssembly(startupHookType, Environment.GetEnvironmentVariable(AgentEnvironmentVariables.DotNetStartupHooks)!)); 240Environment.SetEnvironmentVariable(AgentEnvironmentVariables.DotNetWatchHotReloadNamedPipeName, null); 241Environment.SetEnvironmentVariable(AgentEnvironmentVariables.HotReloadDeltaClientLogMessages, null);
StartupHook.cs (3)
16private static readonly string? s_standardOutputLogPrefix = Environment.GetEnvironmentVariable(AgentEnvironmentVariables.HotReloadDeltaClientLogMessages); 17private static readonly string? s_namedPipeName = Environment.GetEnvironmentVariable(AgentEnvironmentVariables.DotNetWatchHotReloadNamedPipeName); 28var processPath = Environment.GetCommandLineArgs().FirstOrDefault();
Microsoft.Extensions.DotNetDeltaApplier.Tests (5)
AssertEx.cs (4)
120Fail("expected was null, but actual wasn't" + Environment.NewLine + message); 124Fail("actual was null, but expected wasn't" + Environment.NewLine + message); 135Fail(message + Environment.NewLine + expectedAndActual); 182itemSeparator ??= (typeof(T) == typeof(byte)) ? ", " : "," + Environment.NewLine;
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.Extensions.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
190string? environmentValue = Environment.GetEnvironmentVariable(PollingEnvironmentKey);
Microsoft.Extensions.Hosting (3)
HostingHostBuilderExtensions.cs (2)
221string cwd = Environment.CurrentDirectory; 228!string.Equals(cwd, Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase))
Internal\HostingLoggerExtensions.cs (1)
21message = message + Environment.NewLine + ex.Message;
Microsoft.Extensions.Hosting.Systemd (5)
SystemdHelpers.cs (4)
32if (Environment.OSVersion.Platform != PlatformID.Unix) 41int processId = Environment.ProcessId; 48return !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NOTIFY_SOCKET")) || 49!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("LISTEN_PID"));
SystemdNotifier.cs (1)
63string? socketPath = Environment.GetEnvironmentVariable(NOTIFY_SOCKET);
Microsoft.Extensions.Hosting.WindowsServices (1)
Internal\Win32.cs (1)
28Environment.ProcessId;
Microsoft.Extensions.Http (3)
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (1)
36string message = SR.Format(SR.SocketsHttpHandlerBuilder_PrimaryHandlerIsInvalid, nameof(b.PrimaryHandler), typeof(SocketsHttpHandler).FullName, Environment.NewLine, b.PrimaryHandler?.ToString() ?? "(null)");
HttpMessageHandlerBuilder.cs (1)
109Environment.NewLine,
src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (1)
20string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_HTTP_DISABLEURIREDACTION");
Microsoft.Extensions.Logging.AzureAppServices (4)
BatchingLoggerProvider.cs (1)
103_currentBatch.Add(new LogMessage(DateTimeOffset.Now, $"{messagesDropped} message(s) dropped because of queue size limit. Increase the queue size or decrease logging verbosity to avoid this.{Environment.NewLine}"));
WebAppContext.cs (3)
21public string HomeFolder { get; } = Environment.GetEnvironmentVariable("HOME"); 24public string SiteName { get; } = Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME"); 27public string SiteInstanceId { get; } = Environment.GetEnvironmentVariable("WEBSITE_INSTANCE_ID");
Microsoft.Extensions.Logging.Console (14)
ConsoleLoggerProcessor.cs (1)
133message: SR.Format(SR.WarningMessageOnDrop + Environment.NewLine, _messagesDropped),
ConsoleLoggerProvider.cs (1)
71string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION");
JsonConsoleFormatter.cs (1)
129textWriter.Write(Environment.NewLine);
SimpleConsoleFormatter.cs (7)
17private static readonly string _newLineWithMessagePadding = Environment.NewLine + _messagePadding; 111textWriter.Write(Environment.NewLine); 128textWriter.Write(Environment.NewLine); 139WriteReplacing(textWriter, Environment.NewLine, " ", message); 144WriteReplacing(textWriter, Environment.NewLine, _newLineWithMessagePadding, message); 145textWriter.Write(Environment.NewLine); 223textWriter.Write(Environment.NewLine);
src\libraries\Common\src\System\Console\ConsoleUtils.cs (2)
34enabled = Environment.GetEnvironmentVariable("NO_COLOR") is null; 41string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION");
SystemdConsoleFormatter.cs (2)
104textWriter.Write(Environment.NewLine); 108string newMessage = message.Replace(Environment.NewLine, " ");
Microsoft.Extensions.Logging.Debug (2)
DebugLogger.cs (2)
68message = $"{logLevel}: {formatted}{Environment.NewLine}{Environment.NewLine}{exception}";
Microsoft.Extensions.ObjectPool (5)
DefaultObjectPool.cs (1)
30: this(policy, Environment.ProcessorCount * 2)
DefaultObjectPoolProvider.cs (1)
17public int MaximumRetained { get; set; } = Environment.ProcessorCount * 2;
LeakTrackingObjectPool.cs (3)
65_stack = Environment.StackTrace; 76if (!_disposed && !Environment.HasShutdownStarted) 78Debug.Fail($"{typeof(T).Name} was leaked. Created at: {Environment.NewLine}{_stack}");
Microsoft.Extensions.SecretManager.Tools.Tests (2)
InitCommandTest.cs (2)
106var lineCountWithoutSecret = projectDocumentWithoutSecret.ToString().Split(Environment.NewLine).Length; 111var lineCountWithSecret = projectDocumentWithSecret.ToString().Split(Environment.NewLine).Length;
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsSrvServiceEndpointProviderFactory.cs (2)
126var host = Environment.GetEnvironmentVariable("KUBERNETES_SERVICE_HOST"); 127var port = Environment.GetEnvironmentVariable("KUBERNETES_SERVICE_PORT");
ServiceDiscoveryDnsServiceCollectionExtensions.cs (1)
141var envVar = Environment.GetEnvironmentVariable("MICROSOFT_EXTENSIONS_SERVICE_DISCOVERY_DNS_USE_DNSCLIENT_FALLBACK");
Microsoft.Extensions.ServiceDiscovery.Dns.Tests (3)
XunitLoggerFactoryExtensions.cs (3)
63private static readonly string[] s_newLineChars = new[] { Environment.NewLine }; 114if (message.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 116message = message.Substring(0, message.Length - Environment.NewLine.Length);
Microsoft.Extensions.ServiceDiscovery.Dns.Tests.Fuzzing (1)
Program.cs (1)
28{string.Join(Environment.NewLine, fuzzers.Select(f => $" {f.Name}"))}
Microsoft.Extensions.Telemetry (6)
Enrichment\ProcessLogEnricher.cs (1)
32_threadId ??= Environment.CurrentManagedThreadId.ToInvariantString();
Enrichment\StaticProcessLogEnricher.cs (1)
25var pid = Environment.ProcessId;
Latency\Internal\LatencyConsoleExporter.cs (2)
20private static readonly CompositeFormat _title = CompositeFormat.Parse("Latency sample #{0}: {1}ms, {2} checkpoints, {3} tags, {4} measures" + Environment.NewLine); 21private static readonly Func<int, CompositeFormat> _rows = Memoize.Function((int nameColumnWidth) => CompositeFormat.Parse($" {{0,-{nameColumnWidth}}} | {{1}}" + Environment.NewLine));
Logging\ExtendedLogger.cs (2)
186trace = trace.Replace(Environment.NewLine, Environment.NewLine + indentStr + " ", StringComparison.Ordinal).Trim(' ');
Microsoft.Extensions.Telemetry.Tests (1)
Latency\Internal\LatencyConsoleExporterTests.cs (1)
155private static string NormalizeLineEndings(string value) => value.Replace("\r\n", "\n").Replace("\r", "\n").Replace("\n", Environment.NewLine);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
EmitterTests.cs (1)
131string newLine = Environment.NewLine;
Microsoft.Maui (2)
Animations\AnimationManager.cs (1)
68 Environment.TickCount & int.MaxValue;
VisualDiagnostics\VisualDiagnostics.cs (1)
16 static Lazy<bool> isVisualDiagnosticsEnvVarSet = new Lazy<bool>(() => Environment.GetEnvironmentVariable("ENABLE_XAML_DIAGNOSTICS_SOURCE_INFO") is { } value && value == "1");
Microsoft.Maui.Resizetizer (5)
AppleIconAssetsGenerator.cs (1)
78 {{string.Join("," + Environment.NewLine, appIconImagesJson)}}
AsyncTask.cs (1)
69 LogError(ex.Message + Environment.NewLine + ex.StackTrace);
GenerateTizenManifest.cs (1)
61 _tizenManifestFilePath = Path.Combine(Environment.CurrentDirectory, TizenManifestFile);
SkiaSharpTools.cs (2)
30 var retryVariable = Environment.GetEnvironmentVariable("DOTNET_ANDROID_FILE_WRITE_RETRY_ATTEMPTS"); 47 var delayVariable = Environment.GetEnvironmentVariable("DOTNET_ANDROID_FILE_WRITE_RETRY_DELAY_MS");
Microsoft.ML.AutoML (2)
AutoMLExperiment\IPerformanceMonitor.cs (1)
125var cpuUsageInTotal = cpuUsedMs / (Environment.ProcessorCount * _checkIntervalInMilliseconds);
AutoMlUtils.cs (1)
22var res = Environment.GetEnvironmentVariable(MLNetMaxThread);
Microsoft.ML.AutoML.SourceGenerator (15)
Template\EstimatorType.cs (3)
168if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 180textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SearchSpace.cs (3)
185if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 197textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimator.cs (3)
187if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 199textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimator_T_.cs (3)
192if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 204textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Template\SweepableEstimatorFactory.cs (3)
163if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 175textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Microsoft.ML.AutoML.Tests (6)
AutoFeaturizerTests.cs (1)
35if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
ColumnInferenceTests.cs (1)
240if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
SweepableEstimatorPipelineTest.cs (1)
38if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
SweepableExtensionTest.cs (1)
40if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
SweepablePipelineTests.cs (1)
35if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
TrialResultManagerTest.cs (1)
83fileContent = fileContent.Replace(Environment.NewLine, "\r");
Microsoft.ML.CodeGenerator (30)
Templates\Azure\Console\AzureModelBuilder.cs (3)
262if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 274textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Azure\Model\AzureImageModelOutputClass.cs (3)
203if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 215textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Azure\Model\AzureObjectDetectionModelOutputClass.cs (3)
203if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 215textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ConsumeModel.cs (3)
214if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 226textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelBuilder.cs (3)
579if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 591textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelInputClass.cs (3)
177if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 189textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelOutputClass.cs (3)
220if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 232textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\ModelProject.cs (3)
209if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 221textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\PredictProgram.cs (3)
236if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 248textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Templates\Console\PredictProject.cs (3)
214if (textToAppend.EndsWith(global::System.Environment.NewLine, global::System.StringComparison.CurrentCulture)) 226textToAppend = textToAppend.Replace(global::System.Environment.NewLine, (global::System.Environment.NewLine + this.currentIndentField));
Microsoft.ML.CodeGenerator.Tests (2)
ApprovalTests\ConsoleCodeGeneratorTests.cs (1)
42if (System.Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
ApprovalTests\TemplateTest.cs (1)
24if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
Microsoft.ML.Core (12)
ComponentModel\ComponentCatalog.cs (2)
1063errorMsg = err + Environment.NewLine + "Usage For '" + name + "':" + Environment.NewLine + helpText;
Utilities\PathUtils.cs (1)
78var envDir = Environment.GetEnvironmentVariable(CustomSearchDirEnvVariable);
Utilities\ResourceManagerUtils.cs (9)
45var envUrl = Environment.GetEnvironmentVariable(CustomResourcesUrlEnvVariable); 104/// a folder called "mlnet-resources" in the <see cref="Environment.SpecialFolder.ApplicationData"/> directory.</param> 192var envTimeout = Environment.GetEnvironmentVariable(TimeoutEnvVariable); 200/// inside <see cref="Environment.SpecialFolder.LocalApplicationData"/>\mlnet-resources\. 204var envDir = Environment.GetEnvironmentVariable(Utils.CustomSearchDirEnvVariable); 205var appDataBaseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 218if (Environment.OSVersion.Platform == PlatformID.Unix) 237if (Environment.OSVersion.Platform == PlatformID.Unix)
Microsoft.ML.Core.Tests (14)
UnitTests\TestEntryPoints.cs (1)
346.Replace(Environment.NewLine, ""))
UnitTests\TestResourceDownload.cs (13)
30var envVarOld = Environment.GetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable); 31var resourcePathVarOld = Environment.GetEnvironmentVariable(Utils.CustomSearchDirEnvVariable); 32Environment.SetEnvironmentVariable(Utils.CustomSearchDirEnvVariable, null); 36var envVar = Environment.GetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable); 46Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, badUri.AbsoluteUri); 47envVar = Environment.GetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable); 75Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, cnn.AbsoluteUri); 76envVar = Environment.GetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable); 102Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, envVarOld); 103envVar = Environment.GetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable); 128$"MICROSOFTML_RESOURCE_PATH is set to {Environment.GetEnvironmentVariable(Utils.CustomSearchDirEnvVariable)}"); 137Environment.SetEnvironmentVariable(ResourceManagerUtils.CustomResourcesUrlEnvVariable, envVarOld); 138Environment.SetEnvironmentVariable(Utils.CustomSearchDirEnvVariable, resourcePathVarOld);
Microsoft.ML.CpuMath.PerformanceTests (1)
PerformanceTests.cs (1)
51string cpumathSeed = Environment.GetEnvironmentVariable("CPUMATH_SEED");
Microsoft.ML.CpuMath.UnitTests (3)
UnitTests.cs (3)
36public static bool IsNetCore => Environment.Version.Major >= 5 || RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.OrdinalIgnoreCase); 37public static bool IsNetCore2OrOlder => Environment.Version.Major == 4 && Environment.Version.Minor == 0;
Microsoft.ML.Data (6)
Data\DataViewUtils.cs (1)
100int conc = Math.Max(2, Environment.ProcessorCount - 1);
DataLoadSave\Binary\BinaryLoader.cs (3)
783_threads = Math.Max(1, args.Threads ?? (Environment.ProcessorCount / 2)); 849_threads = Math.Max(1, Environment.ProcessorCount / 2); 857_threads = Math.Max(1, Environment.ProcessorCount / 2);
DataLoadSave\Binary\BinarySaver.cs (1)
667Task[] compressionThreads = new Task[Environment.ProcessorCount];
Dirty\ModelParametersBase.cs (1)
88ch.Warning(NormalizerWarningFormat, typePredictor, Environment.NewLine);
Microsoft.ML.FastTree (4)
FastTree.cs (2)
185InitializeThreads(FastTreeTrainerOptions.NumberOfThreads ?? Environment.ProcessorCount); 817ch.Trace("Host = {0}", Environment.MachineName);
GamTrainer.cs (1)
604ThreadTaskManager.Initialize(GamTrainerOptions.NumberOfThreads ?? Environment.ProcessorCount);
SumupPerformanceCommand.cs (1)
99_parallel = args.Parallel ?? Environment.ProcessorCount;
Microsoft.ML.GenAI.LLaMA.Tests (2)
LLaMA3_1Tests.cs (1)
24if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
LLaMA3_2Tests.cs (1)
19if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
Microsoft.ML.GenAI.Mistral.Tests (1)
Mistral_7B_Instruct_V0_3Tests.cs (1)
21if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
Microsoft.ML.GenAI.Phi.Tests (2)
Phi2Tests.cs (1)
21if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
Phi3Tests.cs (1)
22if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null)
Microsoft.ML.KMeansClustering (1)
KMeansPlusPlusTrainer.cs (1)
278int maxThreads = Environment.ProcessorCount / 2;
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
705int numThreads = _options.NumberOfThreads ?? Environment.ProcessorCount;
Microsoft.ML.OneDal (3)
OneDalUtils.cs (3)
23if (Environment.GetEnvironmentVariable("MLNET_BACKEND") == "ONEDAL" && 34var originalPath = Environment.GetEnvironmentVariable("PATH"); 35Environment.SetEnvironmentVariable("PATH", nativeLibs + ";" + originalPath);
Microsoft.ML.OnnxTransformerTest (2)
DnnImageFeaturizerTest.cs (2)
62if (!Environment.Is64BitProcess) 138if (!Environment.Is64BitProcess)
Microsoft.ML.PerformanceTests (1)
Harness\ProjectGenerator.cs (1)
70return string.Join(Environment.NewLine, File.ReadAllLines(csproj.FullName).Where(line => line.Contains("<NativeAssemblyReference")));
Microsoft.ML.Recommender (2)
MatrixFactorizationTrainer.cs (2)
366_threads = options.NumberOfThreads ?? Environment.ProcessorCount; 408_threads = args.NumberOfThreads ?? Environment.ProcessorCount;
Microsoft.ML.Samples (2)
Dynamic\Transforms\NormalizeMinMaxMulticolumn.cs (2)
87Console.WriteLine(Environment.NewLine); 109Console.WriteLine(Environment.NewLine);
Microsoft.ML.SearchSpace.Tests (3)
TestBase.cs (3)
19if (Environment.GetEnvironmentVariable("HELIX_CORRELATION_ID") != null) 39var cwd = Environment.CurrentDirectory; 51var cwd = Environment.CurrentDirectory;
Microsoft.ML.StandardTrainers (6)
Standard\LogisticRegression\LbfgsPredictorBase.cs (3)
451if (Environment.GetEnvironmentVariable("MLNET_BACKEND") == "ONEDAL" && 469int numThreads = !UseThreads ? 1 : (NumThreads ?? Environment.ProcessorCount); 570int numThreads = !UseThreads ? 1 : (NumThreads ?? Environment.ProcessorCount);
Standard\SdcaBinary.cs (1)
141=> Math.Min(8, Math.Max(1, Environment.ProcessorCount / 2));
Standard\SdcaRegression.cs (1)
171=> Math.Min(2, Math.Max(1, Environment.ProcessorCount / 2));
Standard\StochasticTrainerBase.cs (1)
48=> Math.Min(8, Math.Max(1, Environment.ProcessorCount / 2));
Microsoft.ML.Sweeper (1)
ConfigRunner.cs (1)
207RunProcess(Exe, new string[] { arguments }, Environment.CurrentDirectory,
Microsoft.ML.TensorFlow.Tests (3)
TensorflowTests.cs (3)
83_timeOutOldValue = Environment.GetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable); 84Environment.SetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable, (3 * 60 * 1000).ToString()); 90Environment.SetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable, _timeOutOldValue);
Microsoft.ML.TestFramework (13)
Attributes\LightGBMFactAttribute.cs (1)
23return Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm");
Attributes\LightGBMTheoryAttribute.cs (1)
23return Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm");
Attributes\TensorflowFactAttribute.cs (1)
23return (Environment.Is64BitProcess &&
Attributes\TensorflowTheoryAttribute.cs (1)
23return (Environment.Is64BitProcess &&
Attributes\TorchSharpFactAttribute.cs (1)
28return (Environment.Is64BitProcess &&
BaseTestBaseline.cs (7)
150if (!Environment.Is64BitProcess) 166if (Environment.Is64BitProcess) 660var message = iterationOnCollection != null ? "" : $"Output and baseline mismatch at line {iterationOnCollection}." + Environment.NewLine; 664$"Values to compare are {expected} and {actual}" + Environment.NewLine + 665$"\t AllowedVariance: {allowedVariance}" + Environment.NewLine + 666$"\t delta: {delta}" + Environment.NewLine + 667$"\t delta2: {delta2}" + Environment.NewLine);
GlobalBase.cs (1)
34Environment.SetEnvironmentVariable("MKL_CBWR", "COMPATIBLE");
Microsoft.ML.TestFrameworkCommon (5)
Attributes\X64FactAttribute.cs (1)
22return Environment.Is64BitProcess && System.Runtime.InteropServices.RuntimeInformation.ProcessArchitecture == System.Runtime.InteropServices.Architecture.X64;
TestCommon.cs (1)
65string directory = Environment.GetEnvironmentVariable(TestDataDirEnvVariable);
Utility\NativeLibrary.cs (1)
24else if (Environment.OSVersion.Platform == PlatformID.Unix)
Utility\PathResolver.cs (2)
151return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages");
Microsoft.ML.Tests (7)
OnnxConversionTest.cs (6)
199if (Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm")) 240if (Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm")) 295if (Environment.Is64BitProcess) 1673if (Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm")) 1951if (Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm")) 2000if (Environment.Is64BitProcess && NativeLibrary.NativeLibraryExists("lib_lightgbm"))
TrainerEstimators\OneDalEstimators.cs (1)
36Environment.SetEnvironmentVariable("MLNET_BACKEND", "ONEDAL");
Microsoft.ML.Tokenizers (4)
Model\CodeGenTokenizer.cs (2)
1756throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 1796throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Model\EnglishRobertaTokenizer.cs (2)
188throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 228throw new IOException($"Cannot read the file Merge file.{Environment.NewLine}Error message: {e.Message}", e);
Microsoft.ML.Tokenizers.Data.Tests (1)
src\Common\tests\RetryHelper.cs (1)
17private static readonly bool _debug = Environment.GetEnvironmentVariable("DEBUG_RETRYHELPER") == "1";
Microsoft.ML.Tokenizers.Tests (3)
BpeTests.cs (2)
614string result = $"[{string.Join(", ", encoding.Select(t => $"{t.Id}"))} ] {Environment.NewLine}"; 615result += $"[{string.Join(", ", encoding.Select(t => $"\"{t.Value}\""))} ] {Environment.NewLine}";
src\Common\tests\RetryHelper.cs (1)
17private static readonly bool _debug = Environment.GetEnvironmentVariable("DEBUG_RETRYHELPER") == "1";
Microsoft.NET.Build.Containers (1)
Tasks\CreateNewImageToolTask.cs (1)
29string path = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "";
Microsoft.NET.Build.Containers.UnitTests (10)
AuthHandshakeMessageHandlerTests.cs (7)
26string? originalUnameValue = Environment.GetEnvironmentVariable(unameVarName); 27string? originalPwordValue = Environment.GetEnvironmentVariable(pwordVarName); 29Environment.SetEnvironmentVariable(unameVarName, "uname"); 30Environment.SetEnvironmentVariable(pwordVarName, "pword"); 44Environment.SetEnvironmentVariable(unameVarName, originalUnameValue); 45Environment.SetEnvironmentVariable(pwordVarName, originalPwordValue); 56Environment.SetEnvironmentVariable("REGISTRY_AUTH_FILE", authFile);
DockerDaemonTests.cs (2)
34Environment.SetEnvironmentVariable("DOCKER_HOST", "tcp://123.123.123.123:12345"); 40Environment.SetEnvironmentVariable("DOCKER_HOST", null);
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Build.Extensions.Tasks (4)
TaskBase.cs (4)
70Environment.NewLine, 74Environment.NewLine); 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 104s += Environment.NewLine + stackTrace;
Microsoft.NET.Build.Extensions.Tasks.UnitTests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Build.Tasks (20)
CliFolderPathCalculatorCore.cs (3)
24var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName); 27home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
FrameworkPackages\FrameworkPackages.cs (1)
130log.LogMessage("Pack directories found: {0}", string.Join(Environment.NewLine, packDirectories));
FrameworkReferenceResolver.cs (2)
31var programFiles = Environment.GetEnvironmentVariable("ProgramFiles(x86)"); 36programFiles = Environment.GetEnvironmentVariable("ProgramFiles");
ProcessFrameworkReferences.cs (3)
656string.Join(Environment.NewLine, matchingRuntimePacks.Select(rp => rp.RuntimePackNamePatterns))); 1041var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS); 1110string? globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
ResolveTargetingPackAssets.cs (1)
49private static readonly bool s_allowCacheLookup = Environment.GetEnvironmentVariable(ALLOW_TARGETING_PACK_CACHING) != "0";
SdkDirectoryWorkloadManifestProvider.cs (2)
41: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath) 47return new SdkDirectoryWorkloadManifestProvider(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath: null, workloadSetVersion);
ShowMissingWorkloads.cs (1)
45string globalJsonPath = SdkDirectoryWorkloadManifestProvider.GetGlobalJsonPath(Environment.CurrentDirectory);
TaskBase.cs (4)
70Environment.NewLine, 74Environment.NewLine); 95s = s + " ---> " + ExceptionToStringWithoutMessage(e.InnerException) + Environment.NewLine + 104s += Environment.NewLine + stackTrace;
WorkloadInstallType.cs (2)
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
WorkloadResolver.cs (1)
45var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS);
Microsoft.NET.Build.Tasks.UnitTests (8)
GivenAAllowEmptyTelemetry.cs (2)
141string message = $"Received telemetry event '{eventName}'{Environment.NewLine}"; 146message += $" Property '{key}' = '{properties[key]}'{Environment.NewLine}";
ProcessFrameworkReferencesTests.cs (5)
289if (Environment.OSVersion.Platform != PlatformID.Win32NT) 335if (Environment.OSVersion.Platform == PlatformID.Win32NT) 369if (Environment.OSVersion.Platform != PlatformID.Win32NT) 443if (Environment.OSVersion.Platform != PlatformID.Win32NT) 726if (platformId == "Windows" && Environment.OSVersion.Platform != PlatformID.Win32NT)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Build.Tests (22)
AppHostTests.cs (2)
73Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)", 231IsPE32(apphostPath).Should().Be(!Environment.Is64BitProcess);
DesignTimeBuildTests.cs (1)
263string vsInstallDir = Environment.GetEnvironmentVariable("VSINSTALLDIR");
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
GivenThatWeWantToBuildACppCliProject.cs (1)
227propertiesTextElements += $" <LinesToWrite Include='{propertyName}: $({propertyName})'/>" + Environment.NewLine;
GivenThatWeWantToBuildADesktopExe.cs (1)
631(useAlias ? "extern alias snh;" + Environment.NewLine : "") +
GivenThatWeWantToBuildADesktopLibrary.cs (2)
484new XElement("HintPath", $" {Environment.NewLine}{hintPath} {Environment.NewLine}")));
GivenThatWeWantToBuildALibrary.cs (1)
549var stdOut = runCommand.Execute().StdOut.Split(Environment.NewLine.ToCharArray()).Where(line => !string.IsNullOrWhiteSpace(line));
GivenThatWeWantToBuildAnAppWithoutTransitiveProjectRefs.cs (4)
32var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot && Environment.GetEnvironmentVariable("HELIX_WORKITEM_ID") is { } helixGuid ? 187var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot && Environment.GetEnvironmentVariable("HELIX_WORKITEM_ID") is { } helixGuid ?
GivenThatWeWantToBuildANetCoreApp.cs (1)
171var homePath = Environment.GetEnvironmentVariable(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "USERPROFILE" : "HOME");
GivenThatWeWantToBuildWithGlobalJson.cs (3)
16var prevIncludeDefault = Environment.GetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER"); 19Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", "false"); 59Environment.SetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER", prevIncludeDefault);
GivenThatWeWantToTargetEolFrameworks.cs (1)
62var lines = (result.StdOut.Split(Environment.NewLine)).Where(line => line.Contains("NETSDK1138"));
GivenThatWeWantToTargetNotRecommendedFrameworks.cs (1)
88var lines = (result.StdOut.Split(Environment.NewLine)).Where(line => line.Contains("NETSDK1215"));
GivenThatWeWantToVerifyNuGetReferenceCompat.cs (1)
45new ParallelOptions { MaxDegreeOfParallelism = Environment.ProcessorCount },
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Clean.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Pack.Tests (3)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Publish.Tests (14)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
GivenThatAPublishedDepsJsonShouldContainVersionInformation.cs (1)
155var stdOutLines = runAppResult.StdOut.Split(Environment.NewLine);
GivenThatWeWantToPublishAFrameworkDependentApp.cs (1)
87Environment.Is64BitProcess ? "DOTNET_ROOT" : "DOTNET_ROOT(x86)",
GivenThatWeWantToPublishASingleFileApp.cs (2)
856var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot && Environment.GetEnvironmentVariable("HELIX_WORKITEM_ID") is { } helixGuid ?
GivenThatWeWantToPublishAToolProject.cs (1)
55var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot ?
GivenThatWeWantToPublishIncrementally.cs (4)
65var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot && Environment.GetEnvironmentVariable("HELIX_WORKITEM_ID") is { } helixGuid ? 110var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot && Environment.GetEnvironmentVariable("HELIX_WORKITEM_ID") is { } helixGuid ?
GivenThatWeWantToRunILLink.cs (1)
2363errorMessage.AppendLine($"The execution of a hello world app generated a diff in the number of warnings the app produces{Environment.NewLine}");
GivenThatWeWantToStoreAProjectWithDependencies.cs (1)
96if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is string uploadRoot)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Rebuild.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Restore.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Sdk.BlazorWebAssembly.Tasks (2)
BrotliCompress.cs (1)
44_dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
GenerateServiceWorkerAssetsManifest.cs (1)
68Environment.NewLine,
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (17)
AspNetSdkBaselineTest.cs (2)
25public static bool GenerateBaselines = bool.TryParse(Environment.GetEnvironmentVariable("ASPNETCORE_TEST_BASELINES"), out var result) && result; 190string.Join(Environment.NewLine, messages).Should().BeEmpty();
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
StaticWebAssetsBaselineComparer.cs (14)
58{string.Join($"{Environment.NewLine} ", foundDuplicateAssetss.Select(a => @$"{a.Key.Identity} - {a.Value.Length}"))}{Environment.NewLine}"); 97{string.Join($"{Environment.NewLine} ", foundDuplicateEndpoints.Select(a => @$"{a.Key.Route} - {a.Key.AssetFile} - {a.Key.Selectors.Length} - {a.Value.Length}"))}{Environment.NewLine}"); 181{string.Join(Environment.NewLine, assetDifferences)} 232{string.Join($"{Environment.NewLine}\t", missingAssets.Select(a => a.Identity))}"); 238{string.Join($"{Environment.NewLine}\t", unexpectedAssets.Select(a => a.Identity))}"); 241throw new Exception($@"{string.Join(Environment.NewLine, differences)} 355{string.Join(Environment.NewLine, assetDifferences)} 405string.Join($"{Environment.NewLine}\t", expectedEndpoints.Select(a => $"{a.Route} - {a.Selectors.Length} - {a.AssetFile}")), 407string.Join($"{Environment.NewLine}\t", manifestEndpoints.Select(a => $"{a.Route} - {a.Selectors.Length} - {a.AssetFile}")) 413{string.Join($"{Environment.NewLine}\t", missingEndpoints.Select(a => $"{a.Route} - {a.AssetFile}"))}"); 419{string.Join($"{Environment.NewLine}\t", unexpectedEndpoints.Select(a => $"{a.Route} - {a.AssetFile}"))}"); 422throw new Exception($@"{string.Join(Environment.NewLine, differences)}
Microsoft.NET.Sdk.Publish.Tasks (16)
EnvironmentHelper.cs (2)
10return Environment.GetEnvironmentVariable(name); 15var str = Environment.GetEnvironmentVariable(name);
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
MsDeploy\CommonUtility.cs (2)
1680strBuilder.Append(Environment.NewLine); 1686strBuilder.Append(Environment.NewLine);
Tasks\GenerateEFSQLScripts.cs (3)
86string? previousAspNetCoreEnvironment = Environment.GetEnvironmentVariable(AspNetCoreEnvironment); 87Environment.SetEnvironmentVariable(AspNetCoreEnvironment, "Development"); 134Environment.SetEnvironmentVariable(AspNetCoreEnvironment, previousAspNetCoreEnvironment);
Tasks\MsDeploy\CreateMSDeployScript.cs (1)
45var lines = fileContents.Split(new string[] { Environment.NewLine, "\n" }, StringSplitOptions.None);
Tasks\MsDeploy\MSDeploy.cs (6)
265string programFiles = Environment.ExpandEnvironmentVariables("%ProgramFiles(x86)%"); 272if (!Environment.Is64BitOperatingSystem || Environment.Is64BitProcess) 274programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); 280programFiles = Environment.ExpandEnvironmentVariables("%ProgramW6432%");
Microsoft.NET.Sdk.Publish.Tasks.Tests (3)
EnvironmentHelperTests.cs (3)
23string originalValue = Environment.GetEnvironmentVariable(TelemetryOptout); 24Environment.SetEnvironmentVariable(TelemetryOptout, value); 34Environment.SetEnvironmentVariable(TelemetryOptout, originalValue);
Microsoft.NET.Sdk.Razor.Tasks (18)
DotnetToolTask.cs (5)
61var dotnetHostPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH"); 85var processId = Environment.ProcessId; 236var lines = output.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 249var lines = output.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 277var list = responseFileCommands.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
PipeName.cs (1)
34var userName = Environment.UserName;
ServerConnection.cs (8)
57var tmp = Environment.GetEnvironmentVariable("TMP"); 63var temp = Environment.GetEnvironmentVariable("TEMP"); 82var userProfile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 88return Environment.GetEnvironmentVariable("SYSTEMROOT"); 281var expectedPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH"); 288expectedPath = System.Environment.ProcessPath; 299var paths = Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator);
ServerLogger.cs (4)
37var loggingFileName = Environment.GetEnvironmentVariable(EnvironmentVariable); 113GetCurrentProcessId(), Environment.CurrentManagedThreadId, Environment.TickCount); 128Environment.ProcessId;
Microsoft.NET.Sdk.Razor.Tests (3)
BuildIncrementalismTest.cs (1)
148File.AppendAllText(Path.Combine(projectDirectory.Path, "Views", "_ViewImports.cshtml"), Environment.NewLine);
BuildIntegrationTest.cs (1)
216File.AppendAllText(class2Path, Environment.NewLine + "// Some changes");
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Sdk.Razor.Tool.Tests (4)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
ServerCommandTest.cs (3)
39var lines = reader.ReadToEnd().Split(Environment.NewLine); 75Environment.SetEnvironmentVariable("DOTNET_BUILD_PIDFILE_DIRECTORY", expectedPath); 86Environment.SetEnvironmentVariable("DOTNET_BUILD_PIDFILE_DIRECTORY", "");
Microsoft.NET.Sdk.StaticWebAssets.Tasks (24)
Compression\BrotliCompress.cs (1)
35_dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
ComputeReferenceStaticWebAssetItems.cs (2)
52Environment.NewLine + string.Join(Environment.NewLine, all.Select(a => $"({a.Identity},{a.AssetKind})")));
ComputeStaticWebAssetsForCurrentProject.cs (2)
42Environment.NewLine + string.Join(Environment.NewLine, all.Select(a => $"({a.Identity},{a.AssetKind})")));
DefineStaticWebAssets.cs (6)
493var errorMessage = "More than two assets are targeting the same path: " + Environment.NewLine + 494"'{0}' with kind '{1}'" + Environment.NewLine + 495"'{2}' with kind '{3}'" + Environment.NewLine + 515var errorMessage = "Two assets found targeting the same path with incompatible asset kinds:" + Environment.NewLine + 516"'{0}' with kind '{1}'" + Environment.NewLine + 517"'{2}' with kind '{3}'" + Environment.NewLine +
GenerateStaticWebAssetEndpointsManifest.cs (1)
150return (string.Join(Environment.NewLine, parsed), parsed);
JSModules\ApplyJsModules.cs (4)
70Environment.NewLine + 71string.Join(Environment.NewLine, jsModuleFiles.Select(f => f.ItemSpec))); 83Environment.NewLine + 84string.Join(Environment.NewLine, jsModuleFiles.Select(f => f.ItemSpec)));
OverrideHtmlAssetPlaceholders.cs (1)
151return String.Join(Environment.NewLine, links.Select(l => l.Value));
ScopedCss\ApplyCssScopes.cs (4)
73Environment.NewLine + 74string.Join(Environment.NewLine, scopeFiles.Select(f => f.ItemSpec))); 86Environment.NewLine + 87string.Join(Environment.NewLine, scopeFiles.Select(f => f.ItemSpec)));
ServiceWorker\GenerateServiceWorkerAssetsManifest.cs (2)
81Environment.NewLine, 100var content = $"self.assetsManifest = {data};{Environment.NewLine}";
ServiceWorker\UpdateServiceWorkerFileWithVersion.cs (1)
32var versionedContent = $"/* Manifest version: {ManifestVersion} */{Environment.NewLine}{sourceContent}";
Microsoft.NET.Sdk.StaticWebAssets.Tests (101)
AspNetSdkBaselineTest.cs (2)
25public static bool GenerateBaselines = bool.TryParse(Environment.GetEnvironmentVariable("ASPNETCORE_TEST_BASELINES"), out var result) && result; 190string.Join(Environment.NewLine, messages).Should().BeEmpty();
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
StaticWebAssets\DiscoverPrecompressedAssetsTest.cs (5)
37Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js"), 47ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), 62Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js.gz"), 72ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"), 113asset.GetMetadata("ContentRoot").Should().Be(Path.Combine(Environment.CurrentDirectory, $"wwwroot{Path.DirectorySeparatorChar}"));
StaticWebAssets\DiscoverStaticWebAssetsTest.cs (35)
45result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 99result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 149result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 200result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 269result.Should().BeTrue($"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 310result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 357result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 404result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 452result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 560result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 614result.Should().Be(true, $"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 720var manifestPath = Path.Combine(Environment.CurrentDirectory, "CanRoundtripManifest.json"); 729var cachedAsset = CreateCandidate(Path.Combine(Environment.CurrentDirectory, "Input2.txt"), "Input2.txt"); 734var newAsset = CreateCandidate(Path.Combine(Environment.CurrentDirectory, "Input1.txt"), "Input1.txt"); 763.Returns(Path.Combine(Environment.CurrentDirectory, "Debug", "TestProject.csproj")); 765var debugDir = Path.Combine(Environment.CurrentDirectory, "Debug", "wwwroot"); 787result.Should().BeTrue($"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 803.Returns(Path.Combine(Environment.CurrentDirectory, "Debug", "TestProject.csproj")); 805var debugDir = Path.Combine(Environment.CurrentDirectory, "Debug", "wwwroot"); 827result.Should().BeTrue($"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}"); 864result.Should().BeTrue($"Errors: {Environment.NewLine} {string.Join($"{Environment.NewLine} ", errorMessages)}");
StaticWebAssets\GenerateStaticWebAssetsDevelopmentManifestTest.cs (25)
51Environment.CurrentDirectory); 83Environment.CurrentDirectory); 115Environment.CurrentDirectory); 125var fileName = Path.Combine(Environment.CurrentDirectory, subPath); 158Environment.CurrentDirectory); 165var fileName = Path.Combine(Environment.CurrentDirectory, "blob-hash.gz"); 172contentRoot: Environment.CurrentDirectory, 205Environment.CurrentDirectory); 212var fileName = Path.Combine(Environment.CurrentDirectory, "dotnet.native.js"); 216contentRoot: Environment.CurrentDirectory, 239Environment.CurrentDirectory); 323Environment.CurrentDirectory); 337var fileName = Path.Combine(Environment.CurrentDirectory, "index.build.html"); 369Environment.CurrentDirectory); 583Environment.CurrentDirectory); 593CreateAsset(Path.Combine(Environment.CurrentDirectory, "css", "site.css"), "css/site.css"), 594CreateAsset(Path.Combine(Environment.CurrentDirectory, "js", "index.js"), "js/index.js") 619Environment.CurrentDirectory); 629CreateAsset(Path.Combine(Environment.CurrentDirectory, "css", "site.css"), "css/site.css"), 630CreateAsset(Path.Combine(Environment.CurrentDirectory, "CSS", "site.css"), "CSS/site.css"), 657Environment.CurrentDirectory, 668CreateAsset(Path.Combine(Environment.CurrentDirectory, "css", "site.css"), "css/site.css"), 670Path.Combine(Environment.CurrentDirectory, "CSS", "site.css"), 698ContentRoot = StaticWebAsset.NormalizeContentRootPath(contentRoot ?? Path.Combine(Environment.CurrentDirectory, "wwwroot")) 741ContentRoot = StaticWebAsset.NormalizeContentRootPath(contentRoot ?? Environment.CurrentDirectory),
StaticWebAssets\ResolveCompressedAssetsTest.cs (4)
89Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js"), 99ContentRoot = Path.Combine(Environment.CurrentDirectory,"wwwroot"), 114Identity = Path.Combine(Environment.CurrentDirectory, "wwwroot", "js", "site.js.gz"), 124ContentRoot = Path.Combine(Environment.CurrentDirectory, "wwwroot"),
StaticWebAssetsBaselineComparer.cs (14)
58{string.Join($"{Environment.NewLine} ", foundDuplicateAssetss.Select(a => @$"{a.Key.Identity} - {a.Value.Length}"))}{Environment.NewLine}"); 97{string.Join($"{Environment.NewLine} ", foundDuplicateEndpoints.Select(a => @$"{a.Key.Route} - {a.Key.AssetFile} - {a.Key.Selectors.Length} - {a.Value.Length}"))}{Environment.NewLine}"); 181{string.Join(Environment.NewLine, assetDifferences)} 232{string.Join($"{Environment.NewLine}\t", missingAssets.Select(a => a.Identity))}"); 238{string.Join($"{Environment.NewLine}\t", unexpectedAssets.Select(a => a.Identity))}"); 241throw new Exception($@"{string.Join(Environment.NewLine, differences)} 355{string.Join(Environment.NewLine, assetDifferences)} 405string.Join($"{Environment.NewLine}\t", expectedEndpoints.Select(a => $"{a.Route} - {a.Selectors.Length} - {a.AssetFile}")), 407string.Join($"{Environment.NewLine}\t", manifestEndpoints.Select(a => $"{a.Route} - {a.Selectors.Length} - {a.AssetFile}")) 413{string.Join($"{Environment.NewLine}\t", missingEndpoints.Select(a => $"{a.Route} - {a.AssetFile}"))}"); 419{string.Join($"{Environment.NewLine}\t", unexpectedEndpoints.Select(a => $"{a.Route} - {a.AssetFile}"))}"); 422throw new Exception($@"{string.Join(Environment.NewLine, differences)}
StaticWebAssetsPackIntegrationTest.cs (15)
429File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 498File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 566File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 640File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 713File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 782File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 848File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 915File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 981File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1053File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1124File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1191File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1261File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1336File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine); 1413File.WriteAllText(Path.Combine(projectDirectory.Path, "_Imports.razor"), "@using Microsoft.AspNetCore.Components.Web" + Environment.NewLine);
Microsoft.NET.Sdk.Web.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.NET.Sdk.WorkloadManifestReader (7)
EnvironmentVariableNames.cs (2)
36=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, targetFrameworkVersion, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess); 57=> TryGetDotNetRootVariableNameImpl(runtimeIdentifier, defaultAppHostRuntimeIdentifier, null, RuntimeInformation.ProcessArchitecture, Environment.Is64BitProcess, onlyUseArchSpecific: true);
SdkDirectoryWorkloadManifestProvider.cs (2)
41: this(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath) 47return new SdkDirectoryWorkloadManifestProvider(sdkRootPath, sdkVersion, Environment.GetEnvironmentVariable, userProfileDir, globalJsonPath: null, workloadSetVersion);
WorkloadInstallType.cs (2)
44return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "dotnet", "workloads", architecture, sdkFeatureBand.ToString(), "InstallState");
WorkloadResolver.cs (1)
45var packRootEnvironmentVariable = Environment.GetEnvironmentVariable(EnvironmentVariableNames.WORKLOAD_PACK_ROOTS);
Microsoft.NET.Sdk.WorkloadManifestReader.Tests (1)
SdkDirectoryWorkloadManifestProviderTests.cs (1)
1473return Environment.GetEnvironmentVariable(variable);
Microsoft.NET.Sdk.WorkloadMSBuildSdkResolver (5)
CachingWorkloadResolver.cs (1)
61var envVar = Environment.GetEnvironmentVariable("MSBuildEnableWorkloadResolver");
CliFolderPathCalculatorCore.cs (3)
24var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName); 27home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
WorkloadSdkResolver.cs (1)
105string? startDir = Environment.CurrentDirectory;
Microsoft.NET.StringTools (2)
WeakStringCache.Concurrent.cs (2)
23_stringsByHashCode = new ConcurrentDictionary<int, string>(Environment.ProcessorCount, _initialCapacity); 24_weakHandlesByHashCode = new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
Microsoft.NET.TestFramework (65)
Assertions\CommandResultAssertions.cs (26)
53.And.Contain(pattern, AppendDiagnosticsTo($"The command output did not contain expected result: {pattern}{Environment.NewLine}")); 60predicate(_commandResult.StdOut).Should().BeTrue(AppendDiagnosticsTo($"The command output did not contain expected result: {description} {Environment.NewLine}")); 73filteredStdOut = string.Join(Environment.NewLine, filteredStdOut 74.Split(new[] { Environment.NewLine }, StringSplitOptions.None) 80filteredStdOut.Should().NotContain(pattern, AppendDiagnosticsTo($"The command output contained a result it should not have contained: {pattern}{Environment.NewLine}")); 88commandResultNoSpaces.Should().Contain(pattern, AppendDiagnosticsTo($"The command output did not contain expected result: {pattern}{Environment.NewLine}")); 95.And.ContainEquivalentOf(pattern, AppendDiagnosticsTo($"The command output did not contain expected result (ignoring case): {pattern}{Environment.NewLine}")); 102Regex.Match(_commandResult.StdOut ?? string.Empty, pattern, options).Success.Should().BeTrue(AppendDiagnosticsTo($"Matching the command output failed. Pattern: {pattern}{Environment.NewLine}")); 109Regex.Match(_commandResult.StdOut ?? string.Empty, pattern, options).Success.Should().BeFalse(AppendDiagnosticsTo($"The command output matched a pattern it should not have. Pattern: {pattern}{Environment.NewLine}")); 122.And.Be(expectedOutput, AppendDiagnosticsTo($"Command did not output the expected output to StdErr.{Environment.NewLine}Expected: {expectedOutput}{Environment.NewLine}Actual: {_commandResult.StdErr}"), StringComparison.Ordinal); 129.And.Contain(pattern, AppendDiagnosticsTo($"The command error output did not contain expected result: {pattern}{Environment.NewLine}")); 135var lines = _commandResult.StdErr?.Split(new[] { Environment.NewLine }, StringSplitOptions.None); 137matchingLines.Should().NotBe(0, AppendDiagnosticsTo($"The command error output did not contain expected result: {pattern}{Environment.NewLine}")) 138.And.Be(1, AppendDiagnosticsTo($"The command error output was expected to contain the pattern '{pattern}' once, but found it {matchingLines} times.{Environment.NewLine}")); 146.And.NotContain(pattern, AppendDiagnosticsTo($"The command error output contained a result it should not have contained: {pattern}{Environment.NewLine}")); 153Regex.Match(_commandResult.StdErr ?? string.Empty, pattern, options).Success.Should().BeTrue(AppendDiagnosticsTo($"Matching the command error output failed. Pattern: {pattern}{Environment.NewLine}")); 171return s + $"{Environment.NewLine}" + 172$"Working Directory: {_commandResult.StartInfo?.WorkingDirectory}{Environment.NewLine}" + 173$"File Name: {_commandResult.StartInfo?.FileName}{Environment.NewLine}" + 174$"Arguments: {_commandResult.StartInfo?.Arguments}{Environment.NewLine}" + 175$"Exit Code: {_commandResult.ExitCode}{Environment.NewLine}" + 176$"StdOut:{Environment.NewLine}{_commandResult.StdOut}{Environment.NewLine}" + 177$"StdErr:{Environment.NewLine}{_commandResult.StdErr}{Environment.NewLine}"; ;
Assertions\DirectoryInfoAssertions.cs (2)
100var nl = Environment.NewLine; 148var nl = Environment.NewLine;
Commands\TestCommand.cs (2)
179if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is string uploadRoot) 181var binlogFiles = Directory.GetFiles(spec.WorkingDirectory ?? Environment.CurrentDirectory, "*.binlog");
EnvironmentInfo.cs (2)
35Version osVersion = Environment.OSVersion.Version; 186Version osVersion = Environment.OSVersion.Version;
NuGetTestLogger.cs (3)
107return string.Join(Environment.NewLine, ErrorMessages); 112return string.Join(Environment.NewLine, WarningMessages); 117return string.Join(Environment.NewLine, Messages);
ProjectConstruction\TestProject.cs (4)
430source += $" Console.WriteLine({safeDependencyName}.{safeDependencyName}Class.Name);" + Environment.NewLine; 431source += $" Console.WriteLine({safeDependencyName}.{safeDependencyName}Class.List);" + Environment.NewLine; 459source += $" public string {safeDependencyName}Name {{ get {{ return {safeDependencyName}.{safeDependencyName}Class.Name; }} }}" + Environment.NewLine; 460source += $" public List<string> {safeDependencyName}List {{ get {{ return {safeDependencyName}.{safeDependencyName}Class.List; }} }}" + Environment.NewLine;
TestCommandLine.cs (1)
124string? msbuildPath = Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_MSBUILD_PATH");
TestContext.cs (12)
141Environment.SetEnvironmentVariable(name, value); 144Environment.SetEnvironmentVariable("DOTNET_MULTILEVEL_LOOKUP", "0"); 148Environment.SetEnvironmentVariable("MSBuildSdksPath", null); 158else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_AS_TOOL"))) 170else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_ASSETS_DIRECTORY")) && Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_ASSETS_DIRECTORY") is not null) 172testContext.TestAssetsDirectory = Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_ASSETS_DIRECTORY")!; 195else if (Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_EXECUTION_DIRECTORY") != null) 197testContext.TestExecutionDirectory = Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_EXECUTION_DIRECTORY")!; 219string? artifactsDir = Environment.GetEnvironmentVariable("DOTNET_SDK_ARTIFACTS_DIR"); 282Environment.SetEnvironmentVariable( 286Environment.SetEnvironmentVariable(
ToolsetInfo.cs (10)
103throw new Exception("Failed to get dotnet version" + Environment.NewLine + logger.ToString()); 126throw new Exception("Failed to get msbuild version" + Environment.NewLine + logger.ToString()); 173environment["Path"] = DotNetRoot + ";" + Environment.GetEnvironmentVariable("Path"); 192if (Environment.Is64BitProcess) 258string? dotnetInstallDirFromEnvironment = Environment.GetEnvironmentVariable("DOTNET_INSTALL_DIR"); 318var microsoftNETBuildExtensionsTargetsFromEnvironment = Environment.GetEnvironmentVariable("MicrosoftNETBuildExtensionsTargets"); 342else if (Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_MSBUILDSDKRESOLVER_FOLDER") != null) 344ret.SdkResolverPath = Path.Combine(Environment.GetEnvironmentVariable("DOTNET_SDK_TEST_MSBUILDSDKRESOLVER_FOLDER")!, configuration, "net472", "SdkResolvers"); 375.Concat(Environment.GetEnvironmentVariable("PATHEXT")?.Split(pathSplitChar) ?? Array.Empty<string>()) 383var paths = Environment.GetEnvironmentVariable("PATH")?.Split(pathSplitChar);
XunitLoggerProvider.cs (3)
50private static readonly string[] NewLineChars = new[] { Environment.NewLine }; 99if (message.EndsWith(Environment.NewLine)) 101message = message.Substring(0, message.Length - Environment.NewLine.Length);
Microsoft.NET.ToolPack.Tests (6)
GivenThatWeWantToPackAToolProjectWithPackagedShim.cs (5)
265var binlogDestPath = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT") is { } ciOutputRoot ? 293if (!Environment.Is64BitOperatingSystem) 311if (!Environment.Is64BitOperatingSystem) 341if (!Environment.Is64BitOperatingSystem) 363if (!Environment.Is64BitOperatingSystem)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.TemplateEngine.Cli (7)
CliEnvironment.cs (3)
19var env = Environment.GetEnvironmentVariables(); 29public string NewLine { get; } = Environment.NewLine; 39return Environment.ExpandEnvironmentVariables(name);
Commands\create\TemplateCommand.cs (1)
41template.Name + Environment.NewLine + template.Description)
TemplatePackageDisplay.cs (3)
381reporter.Write(Environment.NewLine); 387Environment.NewLine, 389reporter.Write(Environment.NewLine);
Microsoft.TemplateEngine.Cli.UnitTests (48)
ParserTests\HelpTests.cs (9)
76Assert.Equal($"Usage:{Environment.NewLine} new short-name [options] [template options]{Environment.NewLine}{Environment.NewLine}", sw.ToString()); 89Assert.Equal($"Usage:{Environment.NewLine} new short-name1 [options] [template options]{Environment.NewLine} new short-name2 [options] [template options]{Environment.NewLine}{Environment.NewLine}", sw.ToString()); 181Assert.Equal($"Template options:{Environment.NewLine} (No options){Environment.NewLine}", sw.ToString());
ParserTests\HelpTests.Resolution.cs (1)
61return Verify(string.Join(Environment.NewLine, reporter.Lines));
ParserTests\InstantiateTests.NoMatchHandling.cs (1)
16private static readonly string NewLine = Environment.NewLine;
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
TabularOutputTests.cs (36)
29string expectedOutput = $"Col... Column 2 {Environment.NewLine}------ ------------{Environment.NewLine}My ... My test data{Environment.NewLine}My ... My test data{Environment.NewLine}"; 56string expectedOutput = $"Col... Col...{Environment.NewLine}------ ------{Environment.NewLine}My ... My ...{Environment.NewLine}My ... My ...{Environment.NewLine}"; 83string expectedOutput = $"Column 1 Column 2 {Environment.NewLine}------------ -----------{Environment.NewLine}My test data My test ...{Environment.NewLine}My test data My test ...{Environment.NewLine}"; 110string expectedOutput = $"Column 1 Column 2 {Environment.NewLine}------------ ------------{Environment.NewLine}My test data My test data{Environment.NewLine}My test data My test data{Environment.NewLine}"; 139string expectedOutput = $"Column 1 Column 3 {Environment.NewLine}------------ -------------{Environment.NewLine}My test data Column 3 data{Environment.NewLine}My test data Column 3 data{Environment.NewLine}"; 163string expectedOutput = $"Column 1 Column 2 Column 3 {Environment.NewLine}------------- ------------- -------------{Environment.NewLine}Column 1 data Column 2 data Column 3 data{Environment.NewLine}Column 1 data Column 2 data Column 3 data{Environment.NewLine}"; 187string expectedOutput = $"Column 1 Column 2{Environment.NewLine}-------- ---------{Environment.NewLine}Monday Wednesday{Environment.NewLine}Tuesday Sunday {Environment.NewLine}"; 210string expectedOutput = $"Column 1 Column 2{Environment.NewLine}-------- ---------{Environment.NewLine}Monday Wednesday{Environment.NewLine}Tuesday Sunday{Environment.NewLine}"; 309string expectedOutput = $" Column 1 Column 2 Column 3 {Environment.NewLine} ------------- ------------- -------------{Environment.NewLine} Column 1 data Column 2 data Column 3 data{Environment.NewLine} Column 1 data Column 2 data Column 3 data{Environment.NewLine} ";
Microsoft.TestUtilities (1)
XUnit\EnvironmentVariableConditionAttribute.cs (1)
66_currentValue ??= Environment.GetEnvironmentVariable(VariableName);
Microsoft.VisualBasic.Core (19)
Microsoft\VisualBasic\CompilerServices\IOUtils.vb (1)
45DirName = Environment.CurrentDirectory
Microsoft\VisualBasic\CompilerServices\ProjectData.vb (1)
182System.Environment.Exit(0) 'System.Environment.Exit will cause finalizers to be run at shutdown
Microsoft\VisualBasic\FileIO\FileSystem.vb (4)
945If showUI <> UIOptionInternal.NoUI AndAlso Environment.UserInteractive Then 1142If Environment.OSVersion.Platform = PlatformID.Win32NT Then ' Platforms supporting MoveFileEx. 1201If (showUI <> UIOptionInternal.NoUI) AndAlso Environment.UserInteractive Then 1235If (showUI <> UIOptionInternal.NoUI) AndAlso Environment.UserInteractive Then
Microsoft\VisualBasic\FileIO\SpecialDirectories.vb (7)
8Imports System.Environment 28Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.Personal), SR.IO_SpecialDirectory_MyDocuments) 40Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.MyMusic), SR.IO_SpecialDirectory_MyMusic) 52Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.MyPictures), SR.IO_SpecialDirectory_MyPictures) 63Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.Desktop), SR.IO_SpecialDirectory_Desktop) 74Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.Programs), SR.IO_SpecialDirectory_Programs) 85Return GetDirectoryPath(Environment.GetFolderPath(SpecialFolder.ProgramFiles), SR.IO_SpecialDirectory_ProgramFiles)
Microsoft\VisualBasic\FileSystem.vb (1)
389DirName = Environment.CurrentDirectory
Microsoft\VisualBasic\Interaction.vb (5)
40Dim s As String = Environment.CommandLine 61LengthOfAppName = Environment.GetCommandLineArgs(0).Length 90m_SortedEnvList = New System.Collections.SortedList(Environment.GetEnvironmentVariables()) 113Return Environment.GetEnvironmentVariable(Expression) 516If String.Equals(Environment.MachineName, ServerName, StringComparison.OrdinalIgnoreCase) Then
Microsoft.VisualBasic.Tests (5)
Microsoft\VisualBasic\ApplicationServices\ApplicationBaseTests.cs (1)
66var vars = Environment.GetEnvironmentVariables();
Microsoft\VisualBasic\ApplicationServices\ConsoleApplicationBaseTests.cs (1)
12string[] expected = Environment.GetCommandLineArgs().Skip(1).ToArray();
Microsoft\VisualBasic\Devices\ComputerInfoTests.cs (2)
16Environment.OSVersion.Platform.ToString().Should().Be(info.OSPlatform); 17Environment.OSVersion.Version.ToString().Should().Be(info.OSVersion);
Microsoft\VisualBasic\Devices\ServerComputerTests.cs (1)
13Assert.Equal(Environment.MachineName, computer.Name);
Microsoft.VisualStudio.IntegrationTest.Setup (4)
TestTraceListener.cs (4)
71Debugger.Log(0, null, o?.ToString() + Environment.NewLine); 79Debugger.Log(0, category, o?.ToString() + Environment.NewLine); 87Debugger.Log(0, null, message + Environment.NewLine); 95Debugger.Log(0, category, message + Environment.NewLine);
Microsoft.VisualStudio.LanguageServices (29)
ErrorReporting\VisualStudioErrorReportingService.cs (1)
101string.Join(Environment.NewLine, message, detailedError));
ErrorReporting\VisualStudioErrorReportingService.ExceptionFormatting.cs (5)
40text = $"{text}{Environment.NewLine}---> (Inner Exception #{i}) {GetFormattedExceptionStack(aggregate.InnerExceptions[i])} <--- {Environment.NewLine}"; 66stackText += " ---> " + GetFormattedExceptionStack(innerException) + Environment.NewLine + 71return stackText + Environment.NewLine + GetAsyncStackTrace(exception); 89return string.Join(Environment.NewLine, stackFrameLines);
Log\VisualStudioErrorLogger.cs (1)
38=> exception.Message + Environment.NewLine + exception.StackTrace;
PdbSourceDocument\PdbSourceDocumentOutputWindowLogger.cs (2)
68noPumpPane.OutputStringNoPump(message + Environment.NewLine); 72pane.OutputStringThreadSafe(message + Environment.NewLine);
PreviewPane\PreviewPane.xaml.cs (2)
32private static readonly string s_dummyThreeLineTitle = "A" + Environment.NewLine + "A" + Environment.NewLine + "A";
ProjectSystem\FileChangeTracker.cs (1)
66if (!Environment.HasShutdownStarted)
ProjectSystem\InvisibleEditor.cs (1)
193=> Debug.Assert(Environment.HasShutdownStarted, GetType().Name + " was leaked without Dispose being called.");
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (10)
139yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"); 140yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"); 148Environment.GetFolderPath(Environment.SpecialFolder.Windows), 149Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), 150Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
Snippets\SnippetExpansionClient.cs (4)
1114string.Format(ServicesVSResources.The_following_references_were_not_found_0_Please_locate_and_add_them_manually, Environment.NewLine) 1115+ Environment.NewLine + Environment.NewLine 1116+ string.Join(Environment.NewLine, failedReferenceAdditions),
Venus\ContainedLanguageCodeSupport.cs (2)
241if (!newMemberText.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 243newMemberText += Environment.NewLine;
Microsoft.VisualStudio.LanguageServices.CSharp (3)
Interactive\CSharpVsInteractiveWindowProvider.cs (2)
76Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
SemanticSearch\SemanticSearchToolWindowImpl.cs (1)
412pane.OutputStringThreadSafe(message + Environment.NewLine);
Microsoft.VisualStudio.LanguageServices.Implementation (3)
SolutionExplorer\AnalyzersCommandHandler.cs (3)
409var totalMessage = string.Join(Environment.NewLine, notificationMessages); 649notificationService.SendNotification(message1 + Environment.NewLine + Environment.NewLine + message2, severity: NotificationSeverity.Error);
Microsoft.WebTools.AspireService.Tests (5)
AssertEx.cs (4)
120Fail("expected was null, but actual wasn't" + Environment.NewLine + message); 124Fail("actual was null, but expected wasn't" + Environment.NewLine + message); 135Fail(message + Environment.NewLine + expectedAndActual); 182itemSeparator ??= (typeof(T) == typeof(byte)) ? ", " : "," + Environment.NewLine;
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
Microsoft.Win32.Msi.Manual.Tests (1)
Program.cs (1)
53Environment.Exit(e.HResult);
Microsoft.Win32.Msi.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
MinimalSampleOwin (4)
Program.cs (4)
13app.Logger.LogInformation($"Current process ID: {Environment.ProcessId}"); 21Operating System: {Environment.OSVersion} 22.NET version: {Environment.Version} 23Username: {Environment.UserName}
MSBuild (53)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommandLineSwitchException.cs (1)
75return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", commandLineArg);
CommunicationsUtilities.cs (4)
206string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT") ?? ""; 577=> Environment.SetEnvironmentVariable(name, value); 597IDictionary vars = Environment.GetEnvironmentVariables(); 957string environmentValue = Environment.GetEnvironmentVariable(environmentVariable);
DebugUtils.cs (5)
33string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 54Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 69return ScanNodeMode(Environment.CommandLine); 94var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 102$"{ProcessNodeMode.Value}_{EnvironmentUtilities.ProcessName}_PID={EnvironmentUtilities.CurrentProcessId}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
InitializationException.cs (3)
80return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", invalidSwitch); 149errorMessage += Environment.NewLine + e.ToString(); 176errorMessage += Environment.NewLine + e.ToString();
LogMessagePacketBase.cs (2)
261private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
OutOfProcTaskHostNode.cs (1)
792if (Environment.GetEnvironmentVariable("MSBUILDTASKHOSTABORTTASKONCANCEL") == "1")
PerformanceLogEventListener.cs (2)
55string logDirectory = Environment.GetEnvironmentVariable(PerfLogDirEnvVar); 145s_builder.Append($"[{DateTime.UtcNow:o}] Event={eventData.EventSource.Name}/{eventData.EventName} ProcessID={_processIDStr} ThreadID={Environment.CurrentManagedThreadId}\t ");
XMake.cs (27)
251if (Environment.GetEnvironmentVariable("MSBUILDDUMPPROCESSCOUNTERS") == "1") 258Environment.GetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName) == "1" && 260CanRunServerBasedOnCommandLineSwitches(Environment.CommandLine)) 266exitCode = (s_initialized && MSBuildClientApp.Execute(Environment.CommandLine, s_buildCancellationSource.Token) == ExitType.Success) ? 0 : 1; 271exitCode = (s_initialized && Execute(Environment.CommandLine) == ExitType.Success) ? 0 : 1; 274if (Environment.GetEnvironmentVariable("MSBUILDDUMPPROCESSCOUNTERS") == "1") 549switch (Environment.GetEnvironmentVariable("MSBUILDDEBUGONSTART")) 589Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", "true"); 732Environment.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", "1"); 835string timerOutputFilename = Environment.GetEnvironmentVariable("MSBUILDTIMEROUTPUTS"); 991if (Environment.GetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER") != "1") 1081Environment.Exit(1); // the process will now be terminated rudely 1136Environment.Exit(0); // the process can now be terminated as everything has already been gracefully cancelled. 1415if (!string.Equals(Environment.GetEnvironmentVariable("MSBUILDLOGASYNC"), "1", StringComparison.Ordinal)) 1460string memoryUseLimit = Environment.GetEnvironmentVariable("MSBUILDMEMORYUSELIMIT"); 1704Environment.CurrentDirectory), 1832(Environment.OSVersion.Platform != PlatformID.Win32NT || 1833Environment.OSVersion.Version.Major < 6 || 1834(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor < 1))) // Windows 7 is minimum 2196argsFromResponseFile.AddRange(QuotingUtilities.SplitUnquoted(Environment.ExpandEnvironmentVariables(responseFileLine))); 2480Environment.SetEnvironmentVariable("_MSBUILDTLENABLED", useTerminalLogger ? "1" : "0"); 2836string dotnetCliEnvVar = Environment.GetEnvironmentVariable("DOTNET_CLI_CONFIGURE_MSBUILD_TERMINAL_LOGGER"); 2871string liveLoggerArg = Environment.GetEnvironmentVariable("MSBUILDLIVELOGGER"); 2872terminalLoggerArg = Environment.GetEnvironmentVariable("MSBUILDTERMINALLOGGER"); 2984return automatedEnvironmentVariables.Any(envVar => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable(envVar))); 3157if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1") // For example to disable node reuse in a gated checkin, without using the flag
msbuild.Integration.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
MSBuildTaskHost (83)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 687return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
ChangeWaves.cs (1)
130string msbuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION");
CommunicationsUtilities.cs (3)
206string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT") ?? ""; 957string environmentValue = Environment.GetEnvironmentVariable(environmentVariable); 1066Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH");
Constants.cs (1)
134internal static readonly string[] EnvironmentNewLine = [Environment.NewLine];
D\a\_work\1\s\bin\repo\msbuild\src\Shared\ErrorUtilities.cs\ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (4)
66Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 418builder.Append(Environment.NewLine); 421builder.Append(Environment.NewLine); 423builder.Append(Environment.NewLine);
FileUtilities.cs (2)
937if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 942if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
InternalErrorException.cs (3)
115if (Environment.GetEnvironmentVariable("MSBUILDLAUNCHDEBUGGER") != null) 122if (!RunningTests() && Environment.GetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER") == null 123&& Environment.GetEnvironmentVariable("_NTROOT") == null)
LogMessagePacketBase.cs (2)
261private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
NativeMethods.cs (2)
494int numberOfCpus = Environment.ProcessorCount; 1124Version osVersion = Environment.OSVersion.Version;
OutOfProcTaskHost.cs (1)
84switch (Environment.GetEnvironmentVariable("MSBUILDDEBUGONSTART"))
OutOfProcTaskHostNode.cs (1)
792if (Environment.GetEnvironmentVariable("MSBUILDTASKHOSTABORTTASKONCANCEL") == "1")
Traits.cs (60)
32DebugScheduler = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGSCHEDULER")); 33DebugNodeCommunication = DebugEngine || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGCOMM")); 38internal readonly string? MSBuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION"); 41public readonly bool ForceAllTasksOutOfProcToTaskHost = Environment.GetEnvironmentVariable("MSBUILDFORCEALLTASKSOUTOFPROC") == "1"; 46public readonly bool UseLazyWildCardEvaluation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes")); 47public readonly bool LogExpandedWildcards = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGEXPANDEDWILDCARDS")); 48public readonly bool ThrowOnDriveEnumeratingWildcard = Environment.GetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD") == "1"; 53public readonly bool CacheFileExistence = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileExistence")); 55public readonly bool UseSimpleProjectRootElementCacheConcurrency = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildUseSimpleProjectRootElementCacheConcurrency")); 60public readonly bool MSBuildCacheFileEnumerations = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileEnumerations")); 62public readonly bool EnableAllPropertyFunctions = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1"; 67public readonly bool EnableRestoreFirst = Environment.GetEnvironmentVariable("MSBUILDENABLERESTOREFIRST") == "1"; 72public static readonly string? MSBuildNodeHandshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 77public readonly bool ForceEvaluateAsFullFramework = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildForceEvaluateAsFullFramework")); 90public readonly bool EmitSolutionMetaproj = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildEmitSolution")); 100public readonly bool SolutionBatchTargets = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildSolutionBatchTargets")); 105public readonly bool LogPropertyFunctionsRequiringReflection = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildLogPropertyFunctionsRequiringReflection")); 110public readonly bool LogAllAssemblyLoads = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLASSEMBLYLOADS")); 115public static bool LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")); 131public readonly bool EnableRarNode = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildRarNode")); 138public readonly bool DebugEngine = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugEngine")); 141public readonly bool DebugUnitTests = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugUnitTests")); 143public readonly bool InProcNodeDisabled = Environment.GetEnvironmentVariable("MSBUILDNOINPROCNODE") == "1"; 148public readonly bool ForceTaskFactoryOutOfProc = Environment.GetEnvironmentVariable("MSBUILDFORCEINLINETASKFACTORIESOUTOFPROC") == "1"; 165public readonly bool SlnParsingWithSolutionPersistenceOptIn = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILD_PARSE_SLN_WITH_SOLUTIONPERSISTENCE")); 178return int.TryParse(Environment.GetEnvironmentVariable(environmentVariable), out int result) 188return double.TryParse(Environment.GetEnvironmentVariable(environmentVariable), 198string? value = Environment.GetEnvironmentVariable(name); 210public readonly bool DoNotSendDeferredMessagesToBuildManager = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildDoNotSendDeferredMessagesToBuildManager")); 216public readonly bool DoNotExpandQualifiedMetadataInUpdateOperation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation")); 226public readonly bool AlwaysUseContentTimestamp = Environment.GetEnvironmentVariable("MSBUILDALWAYSCHECKCONTENTTIMESTAMP") == "1"; 232public readonly bool TruncateTaskInputs = Environment.GetEnvironmentVariable("MSBUILDTRUNCATETASKINPUTS") == "1"; 237public readonly bool DoNotTruncateConditions = Environment.GetEnvironmentVariable("MSBuildDoNotTruncateConditions") == "1"; 242public readonly bool AlwaysEvaluateDangerousGlobs = Environment.GetEnvironmentVariable("MSBuildAlwaysEvaluateDangerousGlobs") == "1"; 247public readonly bool AlwaysDoImmutableFilesUpToDateCheck = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEMODIFICATIONTIME") == "1"; 252public readonly bool CopyWithoutDelete = Environment.GetEnvironmentVariable("MSBUILDCOPYWITHOUTDELETE") == "1"; 269_logProjectImports = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGIMPORTS")); 286_logTaskInputs = Environment.GetEnvironmentVariable("MSBUILDLOGTASKINPUTS") == "1"; 305var variable = Environment.GetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION"); 325public readonly bool CacheAssemblyInformation = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHERARASSEMBLYINFORMATION") != "1"; 332public readonly bool UseSymlinkTimeInsteadOfTargetTime = Environment.GetEnvironmentVariable("MSBUILDUSESYMLINKTIMESTAMP") == "1"; 337public readonly bool ReuseTaskHostNodes = Environment.GetEnvironmentVariable("MSBUILDREUSETASKHOSTNODES") == "1"; 342public readonly bool IgnoreEmptyImports = Environment.GetEnvironmentVariable("MSBUILDIGNOREEMPTYIMPORTS") == "1"; 347public readonly bool IgnoreTreatAsLocalProperty = Environment.GetEnvironmentVariable("MSBUILDIGNORETREATASLOCALPROPERTY") != null; 352public readonly bool DebugEvaluation = Environment.GetEnvironmentVariable("MSBUILDDEBUGEVALUATION") != null; 357public readonly bool WarnOnUninitializedProperty = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY")); 365public readonly bool UseCaseSensitiveItemNames = Environment.GetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES") == "1"; 370public readonly bool DisableLongPaths = Environment.GetEnvironmentVariable("MSBUILDDISABLELONGPATHS") == "1"; 375public readonly bool DisableSdkResolutionCache = Environment.GetEnvironmentVariable("MSBUILDDISABLESDKCACHE") == "1"; 380public readonly bool TargetPathForRelatedFiles = Environment.GetEnvironmentVariable("MSBUILDTARGETPATHFORRELATEDFILES") == "1"; 385public readonly bool UseSingleLoadContext = Environment.GetEnvironmentVariable("MSBUILDSINGLELOADCONTEXT") == "1"; 390public readonly bool UseAutoRunWhenLaunchingProcessUnderCmd = Environment.GetEnvironmentVariable("MSBUILDUSERAUTORUNINCMD") == "1"; 395public readonly bool AvoidUnicodeWhenWritingToolTaskBatch = Environment.GetEnvironmentVariable("MSBUILDAVOIDUNICODE") == "1"; 400public readonly bool EnsureStdOutForChildNodesIsPrimaryStdout = Environment.GetEnvironmentVariable("MSBUILDENSURESTDOUTFORTASKPROCESSES") == "1"; 408public readonly bool UseMinimalResxParsingInCoreScenarios = Environment.GetEnvironmentVariable("MSBUILDUSEMINIMALRESX") == "1"; 416public readonly bool DoNotVersionBuildResult = Environment.GetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT") == "1"; 421public readonly bool DoNotLimitBuildCheckResultsNumber = Environment.GetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER") == "1"; 456var value = Environment.GetEnvironmentVariable(environmentVariable); 475var mode = Environment.GetEnvironmentVariable("MSBUILD_PROJECTINSTANCE_TRANSLATION_MODE"); 499var mode = Environment.GetEnvironmentVariable("MSBUILD_SDKREFERENCE_PROPERTY_EXPANSION_MODE");
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
223[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Environment))]
MyFrontend (1)
Program.cs (1)
13var isHttps = Environment.GetEnvironmentVariable("DOTNET_LAUNCHPROFILE") == "https";
NativeIISSample (47)
Startup.cs (47)
37await context.Response.WriteAsync("Hello World - " + DateTimeOffset.Now + Environment.NewLine); 38await context.Response.WriteAsync(Environment.NewLine); 40await context.Response.WriteAsync("Address:" + Environment.NewLine); 41await context.Response.WriteAsync("Scheme: " + context.Request.Scheme + Environment.NewLine); 42await context.Response.WriteAsync("Host: " + context.Request.Headers["Host"] + Environment.NewLine); 43await context.Response.WriteAsync("PathBase: " + context.Request.PathBase.Value + Environment.NewLine); 44await context.Response.WriteAsync("Path: " + context.Request.Path.Value + Environment.NewLine); 45await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine); 46await context.Response.WriteAsync(Environment.NewLine); 48await context.Response.WriteAsync("Connection:" + Environment.NewLine); 49await context.Response.WriteAsync("RemoteIp: " + context.Connection.RemoteIpAddress + Environment.NewLine); 50await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine); 51await context.Response.WriteAsync("LocalIp: " + context.Connection.LocalIpAddress + Environment.NewLine); 52await context.Response.WriteAsync("LocalPort: " + context.Connection.LocalPort + Environment.NewLine); 53await context.Response.WriteAsync("ClientCert: " + context.Connection.ClientCertificate + Environment.NewLine); 54await context.Response.WriteAsync(Environment.NewLine); 59await context.Response.WriteAsync(Environment.NewLine); 60await context.Response.WriteAsync("TLS Information:" + Environment.NewLine); 61await context.Response.WriteAsync($"Protocol: {handshakeFeature.Protocol}" + Environment.NewLine); 65await context.Response.WriteAsync($"Cipher Suite: {handshakeFeature.NegotiatedCipherSuite.Value}" + Environment.NewLine); 69await context.Response.WriteAsync("User: " + context.User.Identity.Name + Environment.NewLine); 73await context.Response.WriteAsync("DisplayName: " + scheme?.DisplayName + Environment.NewLine); 76await context.Response.WriteAsync(Environment.NewLine); 78await context.Response.WriteAsync("Headers:" + Environment.NewLine); 81await context.Response.WriteAsync(header.Key + ": " + header.Value + Environment.NewLine); 83await context.Response.WriteAsync(Environment.NewLine); 85await context.Response.WriteAsync("Environment Variables:" + Environment.NewLine); 86var vars = Environment.GetEnvironmentVariables(); 90await context.Response.WriteAsync(key + ": " + value + Environment.NewLine); 92await context.Response.WriteAsync(Environment.NewLine); 95await context.Response.WriteAsync("Server Variables:" + Environment.NewLine); 99await context.Response.WriteAsync(varName + ": " + context.GetServerVariable(varName) + Environment.NewLine); 102await context.Response.WriteAsync(Environment.NewLine); 112await context.Response.WriteAsync(Environment.NewLine); 118await context.Response.WriteAsync(key + Environment.NewLine); 123await context.Response.WriteAsync(Environment.NewLine); 124await context.Response.WriteAsync("IIS Environment Information:" + Environment.NewLine); 125await context.Response.WriteAsync("IIS Version: " + envFeature.IISVersion + Environment.NewLine); 126await context.Response.WriteAsync("ApplicationId: " + envFeature.ApplicationId + Environment.NewLine); 127await context.Response.WriteAsync("Application Path: " + envFeature.ApplicationPhysicalPath + Environment.NewLine); 128await context.Response.WriteAsync("Application Virtual Path: " + envFeature.ApplicationVirtualPath + Environment.NewLine); 129await context.Response.WriteAsync("Application Config Path: " + envFeature.AppConfigPath + Environment.NewLine); 130await context.Response.WriteAsync("AppPool ID: " + envFeature.AppPoolId + Environment.NewLine); 131await context.Response.WriteAsync("AppPool Config File: " + envFeature.AppPoolConfigFile + Environment.NewLine); 132await context.Response.WriteAsync("Site ID: " + envFeature.SiteId + Environment.NewLine); 133await context.Response.WriteAsync("Site Name: " + envFeature.SiteName + Environment.NewLine); 137await context.Response.WriteAsync($"No {nameof(IIISEnvironmentFeature)} available." + Environment.NewLine);
netstandard (1)
netstandard.cs (1)
781[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Environment))]
PhotinoTestApp (2)
Program.cs (2)
29"Fatal exception" + Environment.NewLine + 30error.ExceptionObject.ToString() + Environment.NewLine);
PresentationBuildTasks (2)
MS\Internal\Tasks\TaskHelper.cs (2)
52log.LogMessage(MessageImportance.Low,Environment.NewLine); 55log.LogMessage(MessageImportance.Low, Environment.NewLine);
PresentationCore (92)
MS\Internal\AppModel\SiteOfOriginContainer.cs (2)
47Environment.CurrentManagedThreadId + 182Environment.CurrentManagedThreadId +
MS\Internal\AppModel\SiteOfOriginPart.cs (9)
51Environment.CurrentManagedThreadId + 63Environment.CurrentManagedThreadId + 91Environment.CurrentManagedThreadId + 107Environment.CurrentManagedThreadId + 121Environment.CurrentManagedThreadId + 134Environment.CurrentManagedThreadId + 160Environment.CurrentManagedThreadId + 184Environment.CurrentManagedThreadId + 194Environment.CurrentManagedThreadId +
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (1)
98windowThreadProcessId = Environment.ProcessId;
MS\Internal\FontCache\FamilyCollection.cs (1)
153OperatingSystem osInfo = Environment.OSVersion;
MS\Internal\FontCache\FontCacheUtil.cs (1)
302string s = Environment.GetEnvironmentVariable(WinDir) + @"\Fonts\";
System\IO\Packaging\PackWebRequest.cs (3)
82Environment.CurrentManagedThreadId + ": " + 154Environment.CurrentManagedThreadId + ": " + 170Environment.CurrentManagedThreadId + ": " +
System\IO\Packaging\PackWebRequestFactory.cs (3)
66Environment.CurrentManagedThreadId + ": " + 105Environment.CurrentManagedThreadId + ": " + 118Environment.CurrentManagedThreadId + ": " +
System\IO\Packaging\PackWebResponse.cs (22)
68Environment.CurrentManagedThreadId + ": " + 91Environment.CurrentManagedThreadId + ": " + 101Environment.CurrentManagedThreadId + ": " + 135Environment.CurrentManagedThreadId + ": " + 174Environment.CurrentManagedThreadId + ": " + 196Environment.CurrentManagedThreadId + ": " + 486Environment.CurrentManagedThreadId + ": " + 507Environment.CurrentManagedThreadId + ": " + 520Environment.CurrentManagedThreadId + ": " + 543Environment.CurrentManagedThreadId + ": " + 602Environment.CurrentManagedThreadId + ": " + 619Environment.CurrentManagedThreadId + ": " + 628Environment.CurrentManagedThreadId + ": " + 646Environment.CurrentManagedThreadId + ": " + 659Environment.CurrentManagedThreadId + ": " + 670Environment.CurrentManagedThreadId + ": " + 770Environment.CurrentManagedThreadId + ": " + 792Environment.CurrentManagedThreadId + ": " + 807Environment.CurrentManagedThreadId + ": " + 836Environment.CurrentManagedThreadId + ": " + 878Environment.CurrentManagedThreadId + ": " + 893Environment.CurrentManagedThreadId + ": " +
System\Windows\Automation\Peers\AutomationPeer.cs (2)
1456return new int [] { 7, Environment.ProcessId, this.GetHashCode() }; 2484private static object GetCurrentProcessId(AutomationPeer peer) { return Environment.ProcessId; }
System\Windows\Diagnostics\VisualDiagnostics.cs (1)
225value = Environment.GetEnvironmentVariable(environmentVariable);
System\Windows\Input\KeyboardDevice.cs (1)
264int timeStamp = Environment.TickCount ;
System\Windows\Input\ManipulationLogic.cs (1)
414ManipulationStartingEventArgs starting = new ManipulationStartingEventArgs(_manipulationDevice, Environment.TickCount)
System\Windows\Input\MouseDevice.cs (3)
277int timeStamp = Environment.TickCount; 881int timeStamp = Environment.TickCount; 932int timeStamp = Environment.TickCount;
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
262Environment.TickCount, GetCurrentHostVisual());
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
240if (__inkingDispatcher != null && !Environment.HasShutdownStarted)
System\Windows\Input\Stylus\Common\MultiTouchSystemGestureLogic.cs (3)
63_firstDownTime = Environment.TickCount; 86_firstUpTime = Environment.TickCount; 185int now = Environment.TickCount;
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (3)
312Environment.TickCount, 349Environment.TickCount, 442Environment.TickCount,
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (4)
528int timeStamp = Environment.TickCount; 626int timeStamp = Environment.TickCount; 787_lastEventTimeTicks = Environment.TickCount; 839Environment.TickCount,
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (8)
151Debug.WriteLine("WorkerOperationGetTabletsInfo.OnDoWork failed due to: {0}{1}", Environment.NewLine, e.ToString()); 198result.CommHandle = Environment.Is64BitProcess ? (nint)commHandle : (int)commHandle; 207Debug.WriteLine("WorkerOperationCreateContext.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 314Debug.WriteLine("WorkerOperationRefreshCursorInfo.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 356Debug.WriteLine("WorkerOperationGetTabletInfo.OnDoWork failed due to {0}{1}", Environment.NewLine, e.ToString()); 396Debug.WriteLine("WorkerOperationWorkerGetUpdatedSizes.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 799int timestamp = Environment.TickCount; 1252penContext.FirePenOutOfRange(0, Environment.TickCount);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (3)
917_lastInRangeTime = Environment.TickCount; 1007_lastInRangeTime = Environment.TickCount; 1012_lastInRangeTime = Environment.TickCount;
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
223int timeStamp = Environment.TickCount; 334int timeStamp = Environment.TickCount;
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
82bool runningOnVista = (Environment.OSVersion.Version.Major >= VistaMajorVersion);
System\Windows\Input\TextCompositionEventArgs.cs (1)
27public TextCompositionEventArgs(InputDevice inputDevice, TextComposition composition) : base(inputDevice, Environment.TickCount)
System\Windows\Input\TextServicesContext.cs (1)
110if (!appDomainShutdown || System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Input\Touch.cs (1)
40TouchFrameEventArgs args = new TouchFrameEventArgs(Environment.TickCount);
System\Windows\Input\TouchDevice.cs (1)
939TouchEventArgs touchEventArgs = new TouchEventArgs(this, Environment.TickCount)
System\Windows\InterOp\HwndPointerInputProvider.cs (5)
410handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.InRange, Environment.TickCount); 415handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Move, Environment.TickCount); 420handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Down, Environment.TickCount); 425handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Up, Environment.TickCount); 433handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.OutOfRange, Environment.TickCount);
System\Windows\InterOp\HwndTarget.cs (3)
159/// identified by <see cref="Environment.UserInteractive"/>. 163/// <see cref="Environment.UserInteractive"/>, and (b) a registry override that requests 529else if (processId != Environment.ProcessId)
System\Windows\Interop\OperatingSystemVersionCheck.cs (1)
49OperatingSystem os = Environment.OSVersion;
System\Windows\Media\MediaContext.cs (1)
173!Environment.UserInteractive ? // IF DisplayDevicesNotAvailable && IsNonInteractiveWindowStation/IsService...
System\Windows\MouseOverProperty.cs (1)
46MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice)
System\Windows\StylusOverProperty.cs (1)
38StylusEventArgs stylusEventArgs = new StylusEventArgs(Stylus.CurrentStylusDevice, Environment.TickCount)
PresentationCore.Tests (2)
System\Windows\Media\ColorConverter.Tests.cs (1)
137string? homeDrive = Environment.GetEnvironmentVariable("HOMEDRIVE");
System\Windows\Media\Generated\BrushConverter.Tests.cs (1)
123string? homeDrive = Environment.GetEnvironmentVariable("HOMEDRIVE");
PresentationFramework (23)
Microsoft\Win32\CommonDialog.cs (2)
57if (!Environment.UserInteractive) 128if (!Environment.UserInteractive)
System\Windows\Application.cs (1)
2189System.Environment.ExitCode = exitCode;
System\Windows\Controls\ScrollViewer.cs (2)
1766_panningInfo.InertiaBoundaryBeginTimestamp = Environment.TickCount; 1841if (Math.Abs(Environment.TickCount - _panningInfo.InertiaBoundaryBeginTimestamp) < PanningInfo.InertiaBoundryMinimumTicks)
System\Windows\Controls\VirtualizingStackPanel.cs (2)
9077int totalMilliseconds = Environment.TickCount - startTickCount; 9387int startMilliseconds = Environment.TickCount;
System\Windows\Controls\WebBrowser.cs (1)
751Version osver = Environment.OSVersion.Version;
System\windows\Documents\TextEditor.cs (1)
1225int endOfFirstLine = textData.IndexOf(Environment.NewLine, StringComparison.Ordinal);
System\windows\Documents\TextEditorTyping.cs (2)
1134string filteredText = This._FilterText(Environment.NewLine, This.Selection); 1138This.Selection.Text = Environment.NewLine;
System\Windows\Documents\TextFindEngine.cs (1)
473if (System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Documents\TextRangeBase.cs (4)
694textBuffer.Append(Environment.NewLine); 715textBuffer.Append(Environment.NewLine); 781textBuffer.Append(Environment.NewLine); 787textBuffer.Append(Environment.NewLine);
System\Windows\Documents\TextServicesHost.cs (1)
372if (_thread == Thread.CurrentThread || System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Documents\TextStore.cs (2)
1491if (!(nextChars[0] == Environment.NewLine[0] && nextChars[1] == Environment.NewLine[1]))
System\Windows\Interop\HwndHost.cs (1)
1043(idWindowProcess == Environment.ProcessId))
System\Windows\Standard\Utilities.cs (1)
22private static readonly Version _osVersion = Environment.OSVersion.Version;
System\Windows\StartupEventArgs.cs (1)
55string[] args = Environment.GetCommandLineArgs();
System\Windows\SystemParameters.cs (1)
1183if (System.Environment.OSVersion.Version.Major >= 6)
PresentationUI (2)
MS\Internal\Documents\RightsManagementManager.cs (2)
856string systemPath = Environment.GetFolderPath(Environment.SpecialFolder.System);
ProjectCachePlugin (1)
AssemblyMockCache.cs (1)
68var errorKind = Environment.GetEnvironmentVariable(errorLocation);
RazorBuildWebSite (2)
UpdateableFileProvider.cs (2)
27new TestFileInfo("@page" + Environment.NewLine + "Original content") 112var file = new TestFileInfo("@page" + Environment.NewLine + "Original content")
Replay (16)
Replay.cs (1)
103foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables())
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
Roslyn.Compilers.Extension (2)
CompilerPackage.cs (2)
175var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Roslyn.Diagnostics.Analyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTriviaExtensions.cs (1)
91var newLine = Environment.NewLine;
Roslyn.Test.PdbUtilities (6)
EditAndContinue\EditAndContinueTest.GenerationVerifier.cs (3)
91itemSeparator: "," + Environment.NewLine, 108itemSeparator: "," + Environment.NewLine, 125itemSeparator: "," + Environment.NewLine,
Reader\PdbValidation.cs (3)
144$"PDB format: {format}{Environment.NewLine}", 312$"PDB format: {(isPortable ? "Portable" : "Windows")}{Environment.NewLine}", 353$"PDB format: {(originalIsPortable ? "Windows" : "Portable")} converted from {(originalIsPortable ? "Portable" : "Windows")}{Environment.NewLine}",
Roslyn.Test.Performance.Utilities (5)
Benchview.cs (1)
43var sasToken = Environment.GetEnvironmentVariable(s_sasEnvironmentVar);
RelativeDirectory.cs (1)
61var tempDirectory = Environment.ExpandEnvironmentVariables(@"%SYSTEMDRIVE%\PerfTemp");
TestUtilities.cs (1)
46return Environment.ExpandEnvironmentVariables(@"%SYSTEMDRIVE%\CPC");
VsPerfTest.cs (2)
24private static readonly string _nugetPackagesPath = System.Environment.GetEnvironmentVariable("NUGET_PACKAGES") ?? 25Path.Combine(System.Environment.GetEnvironmentVariable("UserProfile"), ".nuget", "packages");
Roslyn.VisualStudio.DiagnosticsWindow (5)
Loggers\OutputWindowLogger.cs (4)
35OutputPane.WriteLine(string.Format("[{0}] {1} - {2}", Environment.CurrentManagedThreadId, functionId.ToString(), logMessage.GetMessage())); 40OutputPane.WriteLine(string.Format("[{0}] Start({1}) : {2} - {3}", Environment.CurrentManagedThreadId, uniquePairId, functionId.ToString(), logMessage.GetMessage())); 46OutputPane.WriteLine(string.Format("[{0}] End({1}) : [{2}ms] {3}", Environment.CurrentManagedThreadId, uniquePairId, delta, functionString)); 81pane.OutputStringThreadSafe(value + Environment.NewLine);
Panels\WorkspacePanel.xaml.cs (1)
112: $"{Environment.NewLine}{outOfDateCount} documents out of date.");
Roslyn.VisualStudio.Next.UnitTests (1)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
118var random = new Random(Environment.TickCount);
RoutingSandbox (1)
Program.cs (1)
61.UseContentRoot(Environment.CurrentDirectory)
RoutingWebSite (1)
Program.cs (1)
63.UseContentRoot(Environment.CurrentDirectory)
RulesetToEditorconfigConverter (1)
Program.cs (1)
18Path.Combine(Environment.CurrentDirectory, ".editorconfig");
RunTests (16)
ConsoleUtil.cs (1)
18Logger.Log(message + Environment.NewLine);
HelixTestRunner.cs (4)
259if (Environment.GetEnvironmentVariable(knownEnvironmentVariable) is string { Length: > 0 } value) 357if (Environment.GetEnvironmentVariable(name) is { } value) 368if (Environment.GetEnvironmentVariable(name) is { } value) 374Environment.SetEnvironmentVariable(name, defaultValue);
ProcessTestExecutor.cs (2)
180var standardOutput = string.Join(Environment.NewLine, xunitProcessResult.OutputLines) ?? ""; 181var errorOutput = string.Join(Environment.NewLine, xunitProcessResult.ErrorLines) ?? "";
Program.cs (7)
47ConsoleUtil.WriteLine(string.Join(Environment.NewLine, dotnetResult.OutputLines)); 48ConsoleUtil.WriteLine(ConsoleColor.Red, string.Join(Environment.NewLine, dotnetResult.ErrorLines)); 251ConsoleUtil.WriteLine(string.Join(Environment.NewLine, processOutput.OutputLines)); 267ConsoleUtil.WriteLine(string.Join(Environment.NewLine, output.OutputLines)); 268ConsoleUtil.WriteLine(string.Join(Environment.NewLine, output.ErrorLines)); 331var message = $"Multiple unit test assemblies found in '{targetFrameworkDirectory}'. Please adjust the build to prevent this. Matches:{Environment.NewLine}{string.Join(Environment.NewLine, matches)}";
TestHistoryManager.cs (1)
130var envVar = Environment.GetEnvironmentVariable(envVarName);
TestRunner.cs (1)
77var max = _options.Sequential ? 1 : (int)(Environment.ProcessorCount * 1.5);
rzc (28)
CliFolderPathCalculatorCore.cs (3)
24var home = Environment.GetEnvironmentVariable(DotnetHomeVariableName); 27home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
ConnectionHost.cs (1)
63if (Environment.Is64BitProcess || Memory.IsMemoryAvailable())
DebugMode.cs (1)
16Console.WriteLine("Waiting for debugger in pid: {0}", Environment.ProcessId);
DefaultRequestDispatcher.cs (1)
341var response = new ShutdownServerResponse(Environment.ProcessId);
DiscoverCommand.cs (1)
60ProjectDirectory.Values.Add(Environment.CurrentDirectory);
GenerateCommand.cs (1)
131ProjectDirectory.Values.Add(Environment.CurrentDirectory);
Json\Assumed.cs (2)
151=> ThrowHelper.ThrowInvalidOperationException(message + Environment.NewLine + Strings.FormatFile_0_Line_1(path, line)); 156=> ThrowHelper.ThrowInvalidOperationException<T>(message + Environment.NewLine + Strings.FormatFile_0_Line_1(path, line));
PipeName.cs (1)
34var userName = Environment.UserName;
ServerCommand.cs (5)
147var processId = Environment.ProcessId; 159var content = $"{processId}{Environment.NewLine}rzc{Environment.NewLine}{rzcPath}{Environment.NewLine}{Pipe.Value()}"; 169var path = Environment.GetEnvironmentVariable("DOTNET_BUILD_PIDFILE_DIRECTORY");
ServerProtocol\ServerConnection.cs (8)
57var tmp = Environment.GetEnvironmentVariable("TMP"); 63var temp = Environment.GetEnvironmentVariable("TEMP"); 82var userProfile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 88return Environment.GetEnvironmentVariable("SYSTEMROOT"); 281var expectedPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH"); 288expectedPath = System.Environment.ProcessPath; 299var paths = Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator);
ServerProtocol\ServerLogger.cs (4)
37var loggingFileName = Environment.GetEnvironmentVariable(EnvironmentVariable); 113GetCurrentProcessId(), Environment.CurrentManagedThreadId, Environment.TickCount); 128Environment.ProcessId;
SDDLTests (10)
Program.cs (10)
24private static readonly string s_programData = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData); 273Environment.Exit(-1); 295Environment.Exit(-2); 315Environment.Exit(-1); 322Environment.Exit(-1); 335ProcessStartInfo startInfo = new($@"""{Environment.ProcessPath}""", 356Environment.Exit(-1); 365Environment.Exit(-1); 371Environment.Exit(-1);
sdk-tasks (1)
EnvironmentVariableFilter.cs (1)
37var allEnvironmentVariableNames = Environment
Security.TransportSecurity.IntegrationTests (4)
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (1)
84if (Environment.Version.Major == 5 && !OSID.AnyWindows.MatchesCurrent() && !TestProperties.GetProperty(TestProperties.ServiceUri_PropertyName).Contains("/"))
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (3)
87errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 164errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 248errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message);
SemanticSearch.BuildTask (6)
GenerateFilteredReferenceAssembliesTask.cs (3)
82Log.LogError($"GenerateFilteredReferenceAssembliesTask failed with exception:{Environment.NewLine}{e}"); 156var newContent = $"# Generated, do not update manually{Environment.NewLine}" + 157string.Join(Environment.NewLine, apis);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
ServerComparison.TestSites (1)
Program.cs (1)
42Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
Shared.Tests (1)
JsonSchemaExporter\SchemaTestHelpers.cs (1)
47{string.Join(Environment.NewLine, errors)}
SignalRServerlessWeb (3)
Pages_Shared__Layout_cshtml.g.cs (3)
194if (Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT") is { Length: > 0 } endpointUrl) 196var headers = Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS"); 197var attributes = Environment.GetEnvironmentVariable("OTEL_RESOURCE_ATTRIBUTES");
SignalRWeb (3)
Pages_Shared__Layout_cshtml.g.cs (3)
194if (Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT") is { Length: > 0 } endpointUrl) 196var headers = Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS"); 197var attributes = Environment.GetEnvironmentVariable("OTEL_RESOURCE_ATTRIBUTES");
SocialSample (1)
Startup.cs (1)
220context.Failure.Message.Split(Environment.NewLine).Select(s => HtmlEncoder.Default.Encode(s) + "<br>").Aggregate((s1, s2) => s1 + s2));
Sockets.BindTests (7)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (7)
119throw new TimeoutException($"Did not receive a complete response within {Timeout}.{Environment.NewLine}{Environment.NewLine}" + 120$"Expected:{Environment.NewLine}{expected}{Environment.NewLine}{Environment.NewLine}" + 121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}",
Sockets.FunctionalTests (7)
src\Servers\Kestrel\shared\test\StreamBackedTestConnection.cs (7)
119throw new TimeoutException($"Did not receive a complete response within {Timeout}.{Environment.NewLine}{Environment.NewLine}" + 120$"Expected:{Environment.NewLine}{expected}{Environment.NewLine}{Environment.NewLine}" + 121$"Actual:{Environment.NewLine}{new string(actual, 0, offset)}{Environment.NewLine}",
Stress.ApiService (3)
Program.cs (3)
153var urls = Environment.GetEnvironmentVariable("ASPNETCORE_URLS")!.Split(';'); 227new KeyValuePair<string, object?>("Tid", Environment.CurrentManagedThreadId), 228new KeyValuePair<string, object?>("Pid", Environment.ProcessId),
Stress.AppHost (3)
Program.cs (3)
137builder.AddExecutable("executableWithSingleArg", "dotnet", Environment.CurrentDirectory, "--version"); 138builder.AddExecutable("executableWithSingleEscapedArg", "dotnet", Environment.CurrentDirectory, "one two"); 139builder.AddExecutable("executableWithMultipleArgs", "dotnet", Environment.CurrentDirectory, "--version", "one two");
Swaggatherer (4)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
Template.cs (3)
132string.Join(Environment.NewLine, setupEndpointsLines), 133string.Join(Environment.NewLine, setupRequestsLines), 134string.Join(Environment.NewLine, setupMatcherLines),
System.CodeDom (4)
Microsoft\CSharp\CSharpCodeGenerator.cs (1)
151b.Append(Environment.NewLine);
Microsoft\VisualBasic\VBCodeGenerator.cs (1)
364b.Append(Environment.NewLine);
System\CodeDom\Compiler\Executor.cs (2)
25ExecWaitWithCapture(userToken, cmd, Environment.CurrentDirectory, tempFiles, ref outputName, ref errorName); 31ExecWaitWithCapture(IntPtr.Zero, cmd, Environment.CurrentDirectory, tempFiles, ref outputName, ref errorName);
System.Collections.Concurrent (12)
System\Collections\Concurrent\BlockingCollection.cs (3)
954startTime = unchecked((uint)Environment.TickCount); 1099uint elapsedMilliseconds = unchecked((uint)Environment.TickCount - startTime); 1355startTime = unchecked((uint)Environment.TickCount);
System\Collections\Concurrent\ConcurrentBag.cs (6)
154int currentThreadId = Environment.CurrentManagedThreadId; 699_ownerThreadId = Environment.CurrentManagedThreadId; 724Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId); 844Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId); 861Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId); 936Debug.Assert(Environment.CurrentManagedThreadId == _ownerThreadId);
System\Collections\Concurrent\PartitionerStatic.cs (3)
186long rangeSize = (long)(range / (Environment.ProcessorCount * CoreOversubscriptionRate)); 240int rangeSize = (int)(range / (Environment.ProcessorCount * CoreOversubscriptionRate)); 581int fillBufferMultiplier = (Environment.ProcessorCount > 4) ? 4 : 1;
System.CommandLine.StaticCompletions (1)
CompletionsCommand.cs (1)
65var shellPath = Environment.GetEnvironmentVariable("SHELL");
System.CommandLine.StaticCompletions.Tests (8)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
VerifyConfiguration.cs (2)
17if (Environment.GetEnvironmentVariable("CI") is string ci && ci.Equals("true", StringComparison.OrdinalIgnoreCase)) 20directory: Path.Combine(Environment.CurrentDirectory, "snapshots"),
VerifyExtensions.cs (5)
17if (Environment.GetEnvironmentVariable("USER") is string user && user.Contains("helix", StringComparison.OrdinalIgnoreCase) 18|| string.IsNullOrEmpty(Environment.GetEnvironmentVariable("USER"))) 20var runtimeSnapshotDir = new DirectoryInfo(Path.Combine(Environment.CurrentDirectory, "snapshots", provider.ArgumentName)); 24throw new DirectoryNotFoundException($"The directory ({runtimeSnapshotDir}) containing the source file ({sourceFile}) does not exist.\nVerify is going to try to recreate the directory and that won't work in CI.\nThe closest existing directory is ({closestExistingDirectory}). The current directory is ({Environment.CurrentDirectory})."); 31log.WriteLine($"Using snapshots from local repository because $USER {Environment.GetEnvironmentVariable("USER")} is not helix-related");
System.Configuration.ConfigurationManager (4)
System\Configuration\ClientConfigPaths.cs (4)
155string roamingFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); 162string localFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
System.Console (6)
src\libraries\Common\src\System\Console\ConsoleUtils.cs (2)
34enabled = Environment.GetEnvironmentVariable("NO_COLOR") is null; 41string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION");
src\libraries\Common\src\System\Text\EncodingHelper.Unix.cs (1)
39locale = Environment.GetEnvironmentVariable(envVar);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
54string? userHomeDirectory = Environment.GetEnvironmentVariable("HOME");
System\TermInfo.DatabaseFactory.cs (2)
36=> Environment.GetEnvironmentVariable("TERMINFO"); 42string? term = Environment.GetEnvironmentVariable("TERM");
System.Data.Odbc (4)
src\libraries\Common\src\System\Data\ProviderBase\DbConnectionFactory.cs (1)
26private static readonly Task<DbConnectionInternal?>[] s_pendingOpenNonPooled = new Task<DbConnectionInternal?>[Environment.ProcessorCount];
System\Data\Odbc\OdbcConnection.cs (1)
568throw new DllNotFoundException(SR.Odbc_UnixOdbcNotFound + Environment.NewLine + e.Message);
System\Data\Odbc\OdbcException.cs (1)
23builder.Append(Environment.NewLine);
System\Data\Odbc\OdbcInfoMessageEvent.cs (1)
31if (0 < builder.Length) { builder.Append(Environment.NewLine); }
System.Diagnostics.DiagnosticSource (6)
System\Diagnostics\LocalAppContextSwitches.cs (1)
18string? switchValue = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_DIAGNOSTICS_DEFAULTACTIVITYIDFORMATISHIERARCHIAL");
System\Diagnostics\Metrics\CounterAggregator.cs (1)
21private readonly PaddedDouble[] _deltas = new PaddedDouble[Math.Min(Environment.ProcessorCount, 8)];
System\Diagnostics\Metrics\RuntimeMetrics.cs (4)
40() => Environment.WorkingSet, 145() => (long)Environment.ProcessorCount, 179Environment.ProcessCpuUsage processCpuUsage = Environment.CpuUsage;
System.Diagnostics.Process (15)
System\Diagnostics\Process.cs (2)
1109private bool IsCurrentProcess => _processId == Environment.ProcessId; 1119return new Process(".", false, Environment.ProcessId, null);
System\Diagnostics\Process.Linux.cs (4)
56get => IsCurrentProcess ? Environment.CpuUsage.PrivilegedTime : TicksToTimeSpan(GetStat().stime); 134return Environment.CpuUsage.TotalTime; 151get => IsCurrentProcess ? Environment.CpuUsage.UserTime : TicksToTimeSpan(GetStat().utime); 261return procPid == Interop.procfs.ProcPid.Self ? Environment.ProcessPath :
System\Diagnostics\Process.Unix.cs (2)
707string? path = Environment.ProcessPath; 740string? pathEnvVar = Environment.GetEnvironmentVariable("PATH");
System\Diagnostics\ProcessManager.Linux.cs (3)
174yield return Environment.ProcessId; 248if (pid == Environment.ProcessId) 285_procMatchesPidNamespace = !procSelfPid.HasValue || procSelfPid == Environment.ProcessId ? 1 : 2;
System\Diagnostics\ProcessStartInfo.cs (1)
97IDictionary envVars = System.Environment.GetEnvironmentVariables();
System\Diagnostics\ProcessWaitState.Unix.cs (3)
66if (_state != null && !Environment.HasShutdownStarted) 586Environment.FailFast("Error while reaping child. errno = " + errorCode); 632Environment.FailFast("Error while checking for terminated children. errno = " + errorCode);
System.Diagnostics.TextWriterTraceListener (3)
System\Diagnostics\XmlWriterTraceListener.cs (3)
20private readonly string _machineName = Environment.MachineName; 271InternalWrite((uint)Environment.ProcessId); 273InternalWrite((uint)Environment.CurrentManagedThreadId);
System.Diagnostics.TraceSource (9)
System\Diagnostics\DefaultTraceListener.cs (6)
106WriteLine(SR.DebugAssertBanner + Environment.NewLine 107+ SR.DebugAssertShortMessage + Environment.NewLine 108+ message + Environment.NewLine 109+ SR.DebugAssertLongMessage + Environment.NewLine 110+ detailMessage + Environment.NewLine 140Write(message + Environment.NewLine, useLogFile);
System\Diagnostics\TraceEventCache.cs (3)
31return Environment.ProcessId; 39return Environment.CurrentManagedThreadId.ToString(CultureInfo.InvariantCulture); 53public string Callstack => field ??= Environment.StackTrace;
System.Drawing.Common.Tests (4)
mono\System.Drawing\BitmapTests.cs (1)
295sSub = Environment.GetEnvironmentVariable("MSNet") is null ? "mono/" : "MSNet/";
System\Drawing\IconTests.cs (1)
359string bitmapUncPath = $"\\\\{Environment.MachineName}\\{bitmapPath[..bitmapPathRoot.IndexOf(':')]}$\\{bitmapPath.Replace(bitmapPathRoot, "")}";
System\Drawing\ImageAnimator.ManualTests.cs (1)
10public static string OutputFolder { get; } = Path.Join(Environment.CurrentDirectory, "ImageAnimatorManualTests", DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"));
System\Drawing\PenTests.cs (1)
39if (Environment.OSVersion.Platform != PlatformID.Win32NT || CultureInfo.InstalledUICulture.TwoLetterISOLanguageName == "en")
System.Formats.Tar (3)
System\Formats\Tar\TarHeader.Write.cs (3)
1235$"{dirName}/PaxHeaders.{Environment.ProcessId}/{fileName}{Path.DirectorySeparatorChar}" : 1236$"{dirName}/PaxHeaders.{Environment.ProcessId}/{fileName}"; 1252string result = $"{tmp}/GlobalHead.{Environment.ProcessId}.{globalExtendedAttributesEntryNumber}";
System.IO.IsolatedStorage (7)
System\IO\IsolatedStorage\Helper.cs (1)
129location = Environment.ProcessPath;
System\IO\IsolatedStorage\Helper.NonMobile.cs (6)
20Environment.SpecialFolder specialFolder = 21IsMachine(scope) ? Environment.SpecialFolder.CommonApplicationData : // e.g. C:\ProgramData 22IsRoaming(scope) ? Environment.SpecialFolder.ApplicationData : // e.g. C:\Users\Joe\AppData\Roaming 23Environment.SpecialFolder.LocalApplicationData; // e.g. C:\Users\Joe\AppData\Local 25string dataDirectory = Environment.GetFolderPath(specialFolder, Environment.SpecialFolderOption.Create);
System.IO.Pipes (3)
System\IO\Pipes\NamedPipeClientStream.cs (3)
130ConnectInternal(timeout, CancellationToken.None, Environment.TickCount); 163while (timeout == Timeout.Infinite || (elapsed = unchecked(Environment.TickCount - startTime)) < timeout); 196int startTime = Environment.TickCount; // We need to measure time here, not in the lambda
System.IO.Ports (8)
System\IO\Ports\SerialPort.cs (6)
771int startTicks = Environment.TickCount; 779timeUsed = Environment.TickCount - startTicks; 826int startTicks = Environment.TickCount; 876} while (timeout == InfiniteTimeout || (timeout - GetElapsedTime(Environment.TickCount, startTicks) > 0)); 1091timeNow = Environment.TickCount; 1093timeUsed += Environment.TickCount - timeNow;
System\IO\Ports\SerialStream.Unix.cs (2)
920ticksWhenIdleStarted = Environment.TickCount; 922else if (Environment.TickCount - ticksWhenIdleStarted > IOLoopIdleTimeout)
System.Linq (2)
System\Linq\Iterator.cs (2)
33private readonly int _threadId = Environment.CurrentManagedThreadId; 74Iterator<TSource> enumerator = _state == 0 && _threadId == Environment.CurrentManagedThreadId ? this : Clone();
System.Linq.Parallel (3)
System\Linq\Parallel\Channels\AsynchronousChannel.cs (2)
207Environment.CurrentManagedThreadId); 221Environment.CurrentManagedThreadId);
System\Linq\Parallel\Scheduling\Scheduling.cs (1)
34internal static readonly int DefaultDegreeOfParallelism = Math.Min(Environment.ProcessorCount, MAX_SUPPORTED_DOP);
System.Net.Http (36)
src\libraries\Common\src\System\Net\Http\UriRedactionHelper.cs (1)
20string? envVar = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_HTTP_DISABLEURIREDACTION");
System\Net\Http\Headers\HeaderUtilities.cs (1)
336sb.Append(Environment.NewLine);
System\Net\Http\Headers\HttpHeaders.cs (1)
360builder.Append(Environment.NewLine);
System\Net\Http\HttpRequestMessage.cs (1)
167sb.Append(Environment.NewLine);
System\Net\Http\HttpResponseMessage.cs (2)
195sb.Append(Environment.NewLine); 201sb.Append(Environment.NewLine);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
43Environment.GetEnvironmentVariable(UsePortInSpnEnvironmentVariable) is string envVar &&
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (3)
876return connection.GetLifetimeTicks(Environment.TickCount64) > pooledConnectionLifetime.TotalMilliseconds; 887return lifetime == TimeSpan.Zero || connection.GetLifetimeTicks(Environment.TickCount64) > lifetime.TotalMilliseconds; 965long nowTicks = Environment.TickCount64;
System\Net\Http\SocketsHttpHandler\FailedProxyCache.cs (7)
34private long _nextFlushTicks = Environment.TickCount64 + FlushFailuresTimerInMilliseconds; 44/// <returns>If the proxy can be used, <see cref="Immediate"/>. Otherwise, the next <see cref="Environment.TickCount64"/> that it should be used.</returns> 56if (Environment.TickCount64 < renewTicks) 78_failedProxies[uri] = Environment.TickCount64 + FailureTimeoutInMilliseconds; 96if (_failedProxies.Count > LargeProxyConfigBoundary && Environment.TickCount64 >= Interlocked.Read(ref _nextFlushTicks)) 122long curTicks = Environment.TickCount64; 136Interlocked.Exchange(ref _nextFlushTicks, Environment.TickCount64 + FlushFailuresTimerInMilliseconds);
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (3)
162_nextPingRequestTimestamp = Environment.TickCount64 + _keepAlivePingDelay; 2099_nextPingRequestTimestamp = Environment.TickCount64 + _keepAlivePingDelay; 2133long now = Environment.TickCount64;
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (1)
292GetIdleTicks(Environment.TickCount64) >= _keepAliveTimeoutSeconds * 1000;
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (3)
31private readonly long _creationTickCount = Environment.TickCount64; 103if (GlobalHttpSettings.MetricsHandler.IsGloballyEnabled) _connectionMetrics?.ConnectionClosed(durationMs: Environment.TickCount64 - _creationTickCount); 119_idleSinceTickCount = Environment.TickCount64;
System\Net\Http\SocketsHttpHandler\HttpEnvironmentProxy.Unix.cs (9)
21Uri? httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyLC)); 22if (httpProxy == null && Environment.GetEnvironmentVariable(EnvCGI) == null) 24httpProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpProxyUC)); 27Uri? httpsProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyLC)) ?? 28GetUriFromString(Environment.GetEnvironmentVariable(EnvHttpsProxyUC)); 32Uri? allProxy = GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyLC)) ?? 33GetUriFromString(Environment.GetEnvironmentVariable(EnvAllProxyUC)); 47string? noProxy = Environment.GetEnvironmentVariable(EnvNoProxyLC) ?? 48Environment.GetEnvironmentVariable(EnvNoProxyUC);
System\Net\Http\SocketsHttpHandler\RuntimeSettingParser.cs (3)
25string? envVar = Environment.GetEnvironmentVariable(environmentVariableSettingName); 80string? envVar = Environment.GetEnvironmentVariable(environmentVariableSettingName); 94string? envVar = Environment.GetEnvironmentVariable(environmentVariableSettingName);
System.Net.NameResolution (1)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
26string? envVar = Environment.GetEnvironmentVariable(DisableIPv6EnvironmentVariable);
System.Net.NetworkInformation (21)
src\libraries\Common\src\System\IO\RowConfigReader.cs (5)
88int endOfLine = _buffer.IndexOf(Environment.NewLine, afterKey, _comparisonKind); 135|| (keyIndex >= Environment.NewLine.Length && _buffer.AsSpan(keyIndex - Environment.NewLine.Length, Environment.NewLine.Length).SequenceEqual(Environment.NewLine)))
System\Net\NetworkInformation\StringParsingHelpers.Addresses.cs (3)
140int labelLineStart = fileContents.LastIndexOf(Environment.NewLine, labelIndex, StringComparison.Ordinal); 157labelLineStart = fileContents.LastIndexOf(Environment.NewLine, labelIndex, StringComparison.Ordinal); 159int endOfLine = fileContents.IndexOf(Environment.NewLine, labelIndex, StringComparison.Ordinal);
System\Net\NetworkInformation\StringParsingHelpers.Connections.cs (7)
17int endOfTcpLine = sockstatFile.IndexOf(Environment.NewLine, indexOfTcp + 1, StringComparison.Ordinal); 33v4connections = tcp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 43v6connections = tcp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 113v4connections = tcp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 123v6connections = tcp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 193v4connections = udp4FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries); 203v6connections = udp6FileContents.Split(Environment.NewLine, StringSplitOptions.RemoveEmptyEntries);
System\Net\NetworkInformation\StringParsingHelpers.Misc.cs (2)
66return routeFile.AsSpan().Count(Environment.NewLine) - 1; // File includes one-line header 92int endOfSecondLine = snmp4FileContents.IndexOf(Environment.NewLine, secondIpHeader, StringComparison.Ordinal);
System\Net\NetworkInformation\StringParsingHelpers.Statistics.cs (4)
182int endOfSecondLine = fileContents.IndexOf(Environment.NewLine, secondIpHeader, StringComparison.Ordinal); 269int endOfSecondLine = fileContents.IndexOf(Environment.NewLine, secondIpHeader, StringComparison.Ordinal); 336int endOfSecondLine = fileContents.IndexOf(Environment.NewLine, secondTcpHeader, StringComparison.Ordinal); 368int endOfSecondLine = fileContents.IndexOf(Environment.NewLine, secondUdpHeader, StringComparison.Ordinal);
System.Net.Ping (3)
src\libraries\Common\src\System\Net\NetworkInformation\UnixCommandLinePing.cs (2)
104if (ipv4 || Environment.OSVersion.Version.Major > 12) 150if (ipv4 || (OperatingSystem.IsFreeBSD() && Environment.OSVersion.Version.Major > 12))
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
26string? envVar = Environment.GetEnvironmentVariable(DisableIPv6EnvironmentVariable);
System.Net.Quic (4)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (1)
14Environment.GetEnvironmentVariable("DEBUG_SAFEX509HANDLE_FINALIZATION") != null;
src\libraries\Common\src\System\AppContextSwitchHelper.cs (1)
20if (Environment.GetEnvironmentVariable(envVariable) is string str)
src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (1)
11private static readonly string? s_keyLogFile = Environment.GetEnvironmentVariable("SSLKEYLOGFILE");
System\Net\Quic\Internal\MsQuicApi.cs (1)
204NotSupportedReason = $"Current Windows version ({Environment.OSVersion}) is not supported by QUIC. Minimal supported version is {s_minWindowsVersion}.";
System.Net.Requests (4)
System\Net\TimerThread.cs (4)
51_startTimeMilliseconds = Environment.TickCount; 387int nowMilliseconds = Environment.TickCount; 517int now = Environment.TickCount; 546int newNow = Environment.TickCount;
System.Net.Security (6)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
123string? value = AppContext.GetData(TlsCacheSizeCtxName) as string ?? Environment.GetEnvironmentVariable(TlsCacheSizeEnvironmentVariable);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (1)
14Environment.GetEnvironmentVariable("DEBUG_SAFEX509HANDLE_FINALIZATION") != null;
src\libraries\Common\src\System\AppContextSwitchHelper.cs (1)
20if (Environment.GetEnvironmentVariable(envVariable) is string str)
src\libraries\Common\src\System\Net\Security\SslKeyLogger.cs (1)
11private static readonly string? s_keyLogFile = Environment.GetEnvironmentVariable("SSLKEYLOGFILE");
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
56private static readonly byte[] s_workstation = Encoding.Unicode.GetBytes(Environment.MachineName);
System\Net\Security\SslStream.Protocol.cs (1)
43Environment.GetEnvironmentVariable(DisableTlsResumeEnvironmentVariable) is string envVar &&
System.Net.Sockets (15)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
26string? envVar = Environment.GetEnvironmentVariable(DisableIPv6EnvironmentVariable);
System\Net\Sockets\SafeSocketHandle.cs (2)
164_closeSocketThread = Environment.CurrentManagedThreadId; 165_closeSocketTick = Environment.TickCount;
System\Net\Sockets\SocketAsyncContext.Unix.cs (2)
901Environment.FailFast("unexpected queue state"); 989Environment.FailFast("unexpected queue state");
System\Net\Sockets\SocketAsyncEngine.Unix.cs (7)
26internal static readonly bool InlineSocketCompletionsEnabled = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS") == "1"; 42if (uint.TryParse(Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_THREAD_COUNT"), out uint count)) 50return Environment.ProcessorCount; 58return Math.Max(1, (int)Math.Round(Environment.ProcessorCount / (double)coresPerEngine)); 247Environment.FailFast("Exception thrown from SocketAsyncEngine event loop: " + e.ToString(), e); 316int startTimeMs = Environment.TickCount; 333} while (Environment.TickCount - startTimeMs < 15 && eventQueue.TryDequeue(out ev));
System\Net\Sockets\SocketAsyncEventArgs.cs (1)
521if (!Environment.HasShutdownStarted)
System\Net\Sockets\SocketPal.Unix.cs (2)
970long start = socket.IsUnderlyingHandleBlocking && socket.SendTimeout > 0 ? Environment.TickCount64 : 0; // Get ticks only if timeout is set and socket is blocking. 1023if (socket.IsUnderlyingHandleBlocking && socket.SendTimeout > 0 && (Environment.TickCount64 - start) >= socket.SendTimeout)
System.Net.WebSockets (4)
System\Net\WebSockets\ManagedWebSocket.KeepAlive.cs (4)
70long now = Environment.TickCount64; 147NextPingRequestTimestamp = Environment.TickCount64 + DelayMs; 158NextPingRequestTimestamp = Environment.TickCount64 + DelayMs; 193PingTimeoutTimestamp = Environment.TickCount64 + TimeoutMs;
System.Private.CoreLib (185)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (1)
94Environment.FailFast(reason.ToString());
src\libraries\System.Private.CoreLib\src\Internal\Console.cs (3)
18Write(s + Environment.NewLineConst); 22Write(Environment.NewLineConst); 28Write(Environment.NewLineConst);
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
376text.Append(Environment.NewLineConst + InnerExceptionPrefix);
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (9)
15string? str = Environment.GetEnvironmentVariable(envVariable); 33string? str = Environment.GetEnvironmentVariable("DOTNET_" + envVariable) 34?? Environment.GetEnvironmentVariable("COMPlus_" + envVariable); 96string? str = Environment.GetEnvironmentVariable(envVariable); 136string? str = Environment.GetEnvironmentVariable("DOTNET_" + envVariable) 137?? Environment.GetEnvironmentVariable("COMPlus_" + envVariable); 206string? str = Environment.GetEnvironmentVariable(envVariable); 246string? str = Environment.GetEnvironmentVariable("DOTNET_" + envVariable) 247?? Environment.GetEnvironmentVariable("COMPlus_" + envVariable);
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (2)
172SR.AppDomain_Name + FriendlyName + Environment.NewLineConst + SR.AppDomain_NoContextPolicies; 220public static int GetCurrentThreadId() => Environment.CurrentManagedThreadId;
src\libraries\System.Private.CoreLib\src\System\ArgumentOutOfRangeException.cs (1)
81return s + Environment.NewLineConst + valueMessage;
src\libraries\System.Private.CoreLib\src\System\BadImageFormatException.cs (4)
98s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, _fileName); 104s += Environment.NewLineConst + StackTrace; 109s += Environment.NewLineConst + Environment.NewLineConst + _fusionLog;
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (4)
185int currentMilliseconds = Environment.TickCount; 502/// <remarks>Defaults to int.MaxValue. Whatever value is returned will end up being clamped to <see cref="Environment.ProcessorCount"/>.</remarks> 508return Math.Min(partitionCount, Environment.ProcessorCount); 526if (Environment.GetEnvironmentVariableCore_NoArrayPool(variable) is string envVar &&
src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentDictionary.cs (1)
2054private static int DefaultConcurrencyLevel => Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.cs (8)
36WriteLine(SR.DebugAssertBanner + Environment.NewLineConst 37+ SR.DebugAssertShortMessage + Environment.NewLineConst 38+ message + Environment.NewLineConst 39+ SR.DebugAssertLongMessage + Environment.NewLineConst 40+ detailMessage + Environment.NewLineConst 59if (message.EndsWith(Environment.NewLineConst, StringComparison.Ordinal)) 68Write(message + Environment.NewLineConst); 91s += Environment.NewLineConst;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.Unix.cs (2)
8private static readonly bool s_shouldWriteToStdErr = Environment.GetEnvironmentVariable("DOTNET_DebugWriteToStdErr") == "1"; 28Environment.FailFast(ex.Message, ex, errorSource);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\ActivityTracker.cs (1)
491sumPtr[3] = (sumPtr[0] + sumPtr[1] + sumPtr[2] + 0x599D99AD) ^ (uint)Environment.ProcessId;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (2)
3454msg += Environment.NewLine; 3836Debugger.Log(0, null, $"EventSource Error: {msg}{Environment.NewLine}");
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (2)
87_workingSetCounter ??= new PollingCounter("working-set", this, () => ((double)Environment.WorkingSet / 1_000_000)) { DisplayName = "Working Set", DisplayUnits = "MB" }; 120ProcessorCount(Environment.ProcessorCount);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSourceHelper.Unix.cs (1)
11Interop.Sys.GetCpuUtilization(ref s_cpuInfo) / Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Exception.cs (8)
142length += Environment.NewLineConst.Length + InnerExceptionPrefix.Length + innerExceptionString.Length + Environment.NewLineConst.Length + 3 + endOfInnerExceptionResource.Length; 146length += Environment.NewLineConst.Length + stackTrace.Length; 163Write(Environment.NewLineConst, ref resultSpan); 166Write(Environment.NewLineConst, ref resultSpan); 172Write(Environment.NewLineConst, ref resultSpan); 261_remoteStackTraceString = stackTrace + Environment.NewLineConst + SR.Exception_EndStackTraceFromPreviousThrow + Environment.NewLineConst;
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureNotFoundException.cs (1)
103return s + Environment.NewLineConst + valueMessage;
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs (2)
53value = Environment.GetEnvironmentVariable(envVariable); 93Environment.FailFast($"Failed to load app-local ICU: {library}");
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.Unix.cs (1)
31Environment.FailFast(GetIcuLoadFailureMessage());
src\libraries\System.Private.CoreLib\src\System\IO\Directory.cs (2)
260public static string GetCurrentDirectory() => Environment.CurrentDirectory; 266Environment.CurrentDirectory = Path.GetFullPath(path);
src\libraries\System.Private.CoreLib\src\System\IO\FileLoadException.cs (5)
55s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName); 58s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString(); 61s += Environment.NewLineConst + StackTrace; 66s += Environment.NewLineConst + Environment.NewLineConst + FusionLog;
src\libraries\System.Private.CoreLib\src\System\IO\FileNotFoundException.cs (5)
78s += Environment.NewLineConst + SR.Format(SR.IO_FileName_Name, FileName); 81s += Environment.NewLineConst + InnerExceptionPrefix + InnerException.ToString(); 84s += Environment.NewLineConst + StackTrace; 89s += Environment.NewLineConst + Environment.NewLineConst + FusionLog;
src\libraries\System.Private.CoreLib\src\System\IO\Iterator.cs (2)
21_threadId = Environment.CurrentManagedThreadId; 42if (state == 0 && _threadId == Environment.CurrentManagedThreadId)
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
88string? path = Environment.GetEnvironmentVariable(TempEnvVar);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
54string? userHomeDirectory = Environment.GetEnvironmentVariable("HOME");
src\libraries\System.Private.CoreLib\src\System\IO\TextWriter.cs (3)
26private static readonly char[] s_coreNewLine = Environment.NewLineConst.ToCharArray(); 36private string CoreNewLineStr = Environment.NewLineConst; 113value ??= Environment.NewLineConst;
src\libraries\System.Private.CoreLib\src\System\ObjectDisposedException.cs (1)
100return base.Message + Environment.NewLineConst + objectDisposed;
src\libraries\System.Private.CoreLib\src\System\OperatingSystem.cs (1)
328Version current = Environment.OSVersion.Version;
src\libraries\System.Private.CoreLib\src\System\Resources\FileBasedResourceGroveler.cs (1)
44throw new MissingManifestResourceException($"{SR.MissingManifestResource_NoNeutralDisk}{Environment.NewLineConst}baseName: {_mediator.BaseNameField} fileName: {_mediator.GetResourceFileName(culture)}");
src\libraries\System.Private.CoreLib\src\System\Resources\ManifestBasedResourceGroveler.cs (3)
467Debug.Fail("Couldn't get " + CoreLib.Name + ResourceManager.ResFileExtension + " from " + CoreLib.Name + "'s assembly" + Environment.NewLineConst + Environment.NewLineConst + "Are you building the runtime on your machine? Chances are the BCL directory didn't build correctly. Type 'build -c' in the BCL directory. If you get build errors, look at buildd.log. If you then can't figure out what's wrong (and you aren't changing the assembly-related metadata code), ask a BCL dev.\n\nIf you did NOT build the runtime, you shouldn't be seeing this and you've found a bug."); 471System.Environment.FailFast(MesgFailFast);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\PoolingAsyncValueTaskMethodBuilderT.cs (4)
289private static readonly PaddedReference[] s_perCoreCache = new PaddedReference[Environment.ProcessorCount]; 358Debug.Assert(s_perCoreCache.Length == Environment.ProcessorCount, $"{s_perCoreCache.Length} != {Environment.ProcessorCount}"); 359int i = (int)((uint)Thread.GetCurrentProcessorId() % (uint)Environment.ProcessorCount);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\SwitchExpressionException.cs (1)
63return base.Message + Environment.NewLine + valueMessage;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\COMException.cs (1)
65s.Append(Environment.NewLineConst + InnerExceptionPrefix).Append(innerException.ToString());
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ExternalException.cs (2)
64s += Environment.NewLineConst + InnerExceptionPrefix + innerException.ToString(); 68s += Environment.NewLineConst + StackTrace;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (5)
19private static readonly bool s_logFinalization = Environment.GetEnvironmentVariable("DEBUG_SAFEHANDLE_FINALIZATION") == "1"; 78_ctorStackTrace = Environment.StackTrace; 118Internal.Console.WriteLine($"{Environment.NewLine}*** #{count} {GetType()} (0x{handle.ToInt64():x}) finalized! Ctor stack:{Environment.NewLine}{_ctorStackTrace}{Environment.NewLine}");
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (2)
194long now = Environment.TickCount; // Handle wraparound. 370_stackTrace = Environment.StackTrace;
src\libraries\System.Private.CoreLib\src\System\Runtime\Versioning\VersioningHelper.cs (1)
53safeName.Append(Environment.ProcessId);
src\libraries\System.Private.CoreLib\src\System\Security\SecurityElement.cs (4)
435write(obj, Environment.NewLineConst); 444write(obj, Environment.NewLineConst); 457write(obj, Environment.NewLineConst); 469write(obj, Environment.NewLineConst);
src\libraries\System.Private.CoreLib\src\System\SR.cs (1)
71Environment.FailFast(message);
src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (4)
1474/// Replaces all newline sequences in the current string with <see cref="Environment.NewLine"/>. 1478/// with <see cref="Environment.NewLine"/>. 1494/// <see cref="Environment.NewLine"/> as the <em>replacementText</em> parameter. 1498public string ReplaceLineEndings() => ReplaceLineEndings(Environment.NewLineConst);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
872public StringBuilder AppendLine() => Append(Environment.NewLine); 877return Append(Environment.NewLine);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenRegistration.cs (2)
52node.Registrations.ThreadIDExecutingCallbacks != Environment.CurrentManagedThreadId) // The executing thread ID is not this thread's ID. 82node.Registrations.ThreadIDExecutingCallbacks != Environment.CurrentManagedThreadId) // The executing thread ID is not this thread's ID.
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (3)
743registrations.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; 798n.Registrations.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; 801registrations.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; // above may have altered ThreadIDExecutingCallbacks, so reset it
src\libraries\System.Private.CoreLib\src\System\Threading\ExecutionContext.cs (1)
435Environment.FailFast(
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.cs (4)
500int waitStartTimeMs = timeoutMs < 0 ? 0 : Environment.TickCount; 545uint waitDurationMs = (uint)(Environment.TickCount - waitStartTimeMs); 588ushort currentTimeMs = (ushort)Environment.TickCount; 606(ushort)(Environment.TickCount - waiterStartTimeMs) >= MaxDurationMsForPreemptingWaiters;
src\libraries\System.Private.CoreLib\src\System\Threading\Lock.NonNativeAot.cs (2)
26private static bool IsSingleProcessor => Environment.IsSingleProcessor; 64id = (uint)Environment.CurrentManagedThreadId;
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (3)
101bool isSingleProcessor = Environment.IsSingleProcessor; 159int startWaitTicks = timeoutMs != -1 ? Environment.TickCount : 0; 167int endWaitTicks = timeoutMs != -1 ? Environment.TickCount : 0;
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelSpinWaiter.cs (1)
23int processorCount = Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Threading\ManualResetEventSlim.cs (2)
198SpinCount = Environment.IsSingleProcessor ? DEFAULT_SPIN_SP : spinCount; 523startTime = Environment.TickCount64;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Blocking.cs (1)
319int processorCount = Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.cs (3)
123_minThreads = HasForcedMinThreads ? ForcedMinWorkerThreads : (short)Environment.ProcessorCount; 345NotifyWorkItemProgress(GetOrCreateThreadLocalCompletionCountObject(), Environment.TickCount); 384int currentTicks = Environment.TickCount;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.GateThread.cs (5)
47lastCpuUtilizationRefreshTimeMs = Environment.TickCount; 65int currentTimeMs = Environment.TickCount; 71currentTimeMs = Environment.TickCount; 211uint delay = (uint)(Environment.TickCount - threadPoolInstance._separated.lastDequeueTime); 273Environment.FailFast("Failed to create the thread pool Gate thread.", e);
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.HillClimbing.cs (1)
410entry.tickCount = Environment.TickCount;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.Unix.cs (1)
18Interop.Sys.GetCpuUtilization(ref _cpuInfo) / Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WaitThread.cs (2)
207int currentTimeMs = Environment.TickCount; 272currentTimeMs = Environment.TickCount;
src\libraries\System.Private.CoreLib\src\System\Threading\PortableThreadPool.WorkerThread.cs (2)
134threadPoolInstance._separated.lastDequeueTime = Environment.TickCount; 157if (!Environment.IsSingleProcessor)
src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
38currentProcessorId = Environment.CurrentManagedThreadId;
src\libraries\System.Private.CoreLib\src\System\Threading\ReaderWriterLockSlim.cs (13)
247_start = Environment.TickCount; 257_start = Environment.TickCount; 268int elapsed = Environment.TickCount - _start; 300int id = Environment.CurrentManagedThreadId; 445int id = Environment.CurrentManagedThreadId; 652int id = Environment.CurrentManagedThreadId; 789if (Environment.CurrentManagedThreadId == _upgradeLockOwnerId) 810if (Environment.CurrentManagedThreadId != _writeLockOwnerId) 857if (Environment.CurrentManagedThreadId != _upgradeLockOwnerId) 1229if ((spinCount < 5) && (Environment.ProcessorCount > 1)) 1379if (Environment.CurrentManagedThreadId == _upgradeLockOwnerId) 1403if (Environment.CurrentManagedThreadId == _writeLockOwnerId) 1568!Environment.IsSingleProcessor)
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
92TimeoutTimeMs = Environment.TickCount + TimeoutDurationMs;
src\libraries\System.Private.CoreLib\src\System\Threading\SemaphoreSlim.cs (1)
342startTime = Environment.TickCount64;
src\libraries\System.Private.CoreLib\src\System\Threading\SpinLock.cs (4)
293startTime = Environment.TickCount64; 351if (turn > Environment.ProcessorCount) 414int newOwner = Environment.CurrentManagedThreadId; 576return (_owner & (~LOCK_ID_DISABLE_MASK)) == Environment.CurrentManagedThreadId;
src\libraries\System.Private.CoreLib\src\System\Threading\SpinWait.cs (5)
91internal static readonly int SpinCountforSpinBeforeWait = Environment.IsSingleProcessor ? 1 : 35; 120public bool NextSpinWillYield => _count >= YieldThreshold || Environment.IsSingleProcessor; 178Environment.IsSingleProcessor) 318startTime = (uint)Environment.TickCount; 332if (millisecondsTimeout <= (uint)Environment.TickCount - startTime)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
64private static int DefaultMaxConcurrencyLevel => Environment.ProcessorCount;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (2)
3061uint startTimeTicks = infiniteWait ? 0 : (uint)Environment.TickCount; 3103uint elapsedTimeTicks = ((uint)Environment.TickCount) - startTimeTicks;
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TplEventSource.cs (1)
572int pid = Environment.ProcessId;
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (4)
408Environment.ProcessorCount <= 32 ? 0 : 409(Environment.ProcessorCount + (ProcessorsPerAssignableWorkItemQueue - 1)) / ProcessorsPerAssignableWorkItemQueue; 1097int startTickCount = Environment.TickCount; 1172int currentTickCount = Environment.TickCount;
src\libraries\System.Private.CoreLib\src\System\Threading\TimeoutHelper.cs (1)
24ulong elapsedMilliseconds = (ulong)(Environment.TickCount64 - startTime);
src\libraries\System.Private.CoreLib\src\System\Threading\Timer.cs (1)
51var queues = new TimerQueue[Environment.ProcessorCount];
src\libraries\System.Private.CoreLib\src\System\Threading\TimerQueue.Unix.cs (1)
8public static long TickCount64 => Environment.TickCount64;
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (1)
74Environment.FailFast("Too many outstanding Win32ThreadPoolNativeOverlapped instances");
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (2)
226string? result = Environment.GetEnvironmentVariable(TimeZoneEnvironmentVariable); 507string? tzDirectory = Environment.GetEnvironmentVariable(TimeZoneDirectoryEnvironmentVariable);
src\System\Exception.CoreCLR.cs (1)
110_remoteStackTraceString = tmpStackTraceString + Environment.NewLineConst;
src\System\RuntimeType.ActivatorCache.cs (2)
158+ Environment.NewLineConst + "Expected: " + (_originalRuntimeType ?? (object)"<null>") 159+ Environment.NewLineConst + "Actual: " + (rt ?? (object)"<null>"));
src\System\RuntimeType.BoxCache.cs (2)
64+ Environment.NewLineConst + "Expected: " + (_originalRuntimeType ?? (object)"<null>") 65+ Environment.NewLineConst + "Actual: " + (rt ?? (object)"<null>"));
src\System\RuntimeType.CreateUninitializedCache.CoreCLR.cs (2)
46+ Environment.NewLineConst + "Expected: " + (_originalRuntimeType ?? (object)"<null>") 47+ Environment.NewLineConst + "Actual: " + (rt ?? (object)"<null>"));
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\DataContractSet.cs (1)
594errorMessage.AppendFormat("{0}\"{1}\" ", Environment.NewLine, conflictingType.AssemblyQualifiedName);
System.Private.Windows.Core (17)
Windows.Win32.IAdviseSink.g.cs (5)
80 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 110 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 140 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 166 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 191 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows.Win32.IRecordInfo.g.cs (2)
575 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 607 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows.Win32.ITypeInfo.g.cs (3)
803 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 840 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 877 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows.Win32.ITypeLib.g.cs (2)
67 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 458 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows\Win32\Graphics\GdiPlus\GdiplusStartupInputEx.cs (1)
10OperatingSystem os = Environment.OSVersion;
Windows\Win32\PInvokeCore.GetClassLong.cs (1)
20=> Environment.Is64BitProcess
Windows\Win32\PInvokeCore.GetWindowLong.cs (1)
30nint result = Environment.Is64BitProcess
Windows\Win32\PInvokeCore.SetClassLong.cs (1)
18=> Environment.Is64BitProcess
Windows\Win32\PInvokeCore.SetWindowLong.cs (1)
19nint result = Environment.Is64BitProcess
System.Private.Windows.Core.TestUtilities (7)
NoAssertContext.cs (6)
34s_suppressedThreads.AddOrUpdate(Environment.CurrentManagedThreadId, 1, (key, oldValue) => oldValue + 1); 65int currentThread = Environment.CurrentManagedThreadId; 129if (!s_suppressedThreads.TryGetValue(Environment.CurrentManagedThreadId, out _)) 137if (!s_suppressedThreads.TryGetValue(Environment.CurrentManagedThreadId, out _)) 147if (!s_suppressedThreads.TryGetValue(Environment.CurrentManagedThreadId, out _)) 155if (!s_suppressedThreads.TryGetValue(Environment.CurrentManagedThreadId, out _))
ThrowingTraceListener.cs (1)
15: $"{Environment.NewLine}{detailMessage}")}");
System.Private.Xml (13)
System\Xml\Core\XmlWriterSettings.cs (1)
506_newLineChars = Environment.NewLine; // "\r\n" on Windows, "\n" on Unix
System\Xml\Serialization\SchemaObjectWriter.cs (1)
194_w.Append(Environment.NewLine);
System\Xml\Serialization\XmlSchemas.cs (2)
591err += $"{Environment.NewLine}{Dump(src)}{Environment.NewLine}{Dump(dest)}";
System\Xml\Serialization\XmlSerializationWriter.cs (4)
2455if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 3034if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3073if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 4160if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, structMapping.TypeDesc!.Name) + Environment.StackTrace);
System\Xml\Xsl\IlGen\XmlILTrace.cs (1)
44s_dirName = Environment.GetEnvironmentVariable("XmlILTrace");
System\Xml\Xsl\QIL\QilValidationVisitor.cs (1)
182message = $"{s}{Environment.NewLine}{message}";
System\Xml\Xsl\XPath\XPathCompileException.cs (1)
118message += Environment.NewLine;
System\Xml\Xsl\XslException.cs (2)
91result += $" ---> {InnerException}{Environment.NewLine} {CreateMessage(SR.Xml_EndOfInnerExceptionStack)}"; 95result += Environment.NewLine + StackTrace;
System.Reflection.Metadata (1)
System\Reflection\Internal\Utilities\ObjectPool`1.cs (1)
42: this(factory, Environment.ProcessorCount * 2)
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
179[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Environment))]
System.Runtime.Caching (6)
System\Runtime\Caching\Dbg.cs (5)
14private static readonly bool s_tracingEnabled = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_RUNTIME_CACHING_TRACING") == "true"; 28e is ExternalException ee ? "Exception " + e + Environment.NewLine + "_hr=0x" + ee.ErrorCode.ToString("x", CultureInfo.InvariantCulture) : 39Environment.CurrentManagedThreadId, 42Environment.NewLine, 43exceptionMessage != null ? exceptionMessage + Environment.NewLine : "");
System\Runtime\Caching\MemoryCache.cs (1)
359_storeCount = Environment.ProcessorCount;
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
17[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Environment))]
System.Runtime.InteropServices (1)
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
37public static string GetSystemVersion() => $"v{Environment.Version}";
System.Runtime.Numerics (6)
System\Numerics\BigInteger.cs (6)
2042if (Environment.Is64BitProcess) 2149if (Environment.Is64BitProcess) 2305if (Environment.Is64BitProcess) 2389if (Environment.Is64BitProcess) 4879if (Environment.Is64BitProcess && (value._bits.Length >= 2)) 5060if (Environment.Is64BitProcess && (value._bits.Length >= 2))
System.Security.Cryptography (4)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (1)
14Environment.GetEnvironmentVariable("DEBUG_SAFEX509HANDLE_FINALIZATION") != null;
src\libraries\Common\src\System\IO\MemoryMappedFiles\MemoryMappedFileMemoryManager.cs (1)
32Environment.FailFast("MemoryMappedFileMemoryManager was finalized.");
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
54string? userHomeDirectory = Environment.GetEnvironmentVariable("HOME");
System\Security\Cryptography\X509Certificates\X500NameEncoder.cs (1)
53dnSeparator = Environment.NewLine;
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\Reference.cs (1)
364string baseUri = (document == null ? System.Environment.CurrentDirectory + "\\" : document.BaseURI);
System.Security.Permissions (3)
System\Security\HostProtectionException.cs (3)
71sb.Append(Environment.NewLine); 72sb.Append(Environment.NewLine); 74sb.Append(Environment.NewLine);
System.ServiceModel.Primitives (11)
Internals\System\Runtime\Fx.cs (1)
172Environment.FailFast(failFastMessage);
Internals\System\Runtime\IOThreadScheduler.cs (1)
240if (!Environment.HasShutdownStarted)
Internals\System\Runtime\SynchronizedPool.cs (3)
212int thisThreadID = Environment.CurrentManagedThreadId; 265int thisThreadID = Environment.CurrentManagedThreadId; 340return Environment.ProcessorCount;
Internals\System\Runtime\TimeoutHelper.cs (1)
295uint currentTime = (uint)Environment.TickCount;
Internals\WcfEventSource.cs (1)
27if (Environment.Version.Major >= 5)
System\IdentityModel\Claims\X509CertificateClaimSet.cs (1)
449Environment.NewLine,
System\ServiceModel\Security\TimeBoundedCache.cs (3)
295Environment.FailFast("Cache write lock is not held."); 357Environment.FailFast("Cache write lock is not held."); 374Environment.FailFast("Cache write lock is not held.");
System.ServiceModel.Primitives.Tests (2)
ServiceModel\MessageContractTest.4.4.0.cs (2)
175string headerValue = header.ToString().Replace(Environment.NewLine, String.Empty).Replace(" ", String.Empty); 321name, Environment.NewLine, value, errorBuilder.ToString()));
System.Text.Json (6)
System\Text\Json\Serialization\JsonSerializerOptions.cs (2)
773/// The default is the value of <see cref="Environment.NewLine"/>. 788return _newLine ??= Environment.NewLine;
System\Text\Json\Writer\JsonWriterOptions.cs (4)
16private static readonly string s_alternateNewLine = Environment.NewLine.Length == 2 ? JsonConstants.NewLineLineFeed : JsonConstants.NewLineCarriageReturnLineFeed; 142/// The default is the value of <see cref="Environment.NewLine"/>. 152get => (_optionsMask & NewLineBit) != 0 ? s_alternateNewLine : Environment.NewLine; 156if (value != Environment.NewLine)
System.Text.RegularExpressions (7)
System\Text\RegularExpressions\RegexLWCGCompiler.cs (1)
26private static readonly bool s_includePatternInName = Environment.GetEnvironmentVariable(IncludePatternInNamesEnvVar) == "1";
System\Text\RegularExpressions\RegexRunner.cs (2)
351_timeoutOccursAt = Environment.TickCount64 + _timeout; 359if (_checkTimeout && Environment.TickCount64 >= _timeoutOccursAt)
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.Automata.cs (1)
367if ((timeoutOccursAt != 0 && Environment.TickCount64 > timeoutOccursAt) || // if there's an active timer
System\Text\RegularExpressions\Symbolic\SymbolicRegexMatcher.cs (2)
341if (Environment.TickCount64 >= timeoutOccursAt) 364timeoutOccursAt = Environment.TickCount64 + _timeout;
System\Text\RegularExpressions\Symbolic\UnicodeCategoryRangesGenerator.cs (1)
33// It provides serialized BDD Unicode category definitions for System.Environment.Version = {Environment.Version}
System.Threading (7)
System\Threading\Barrier.cs (5)
329if (_actionCallerID != 0 && Environment.CurrentManagedThreadId == _actionCallerID) 424if (_actionCallerID != 0 && Environment.CurrentManagedThreadId == _actionCallerID) 637if (_actionCallerID != 0 && Environment.CurrentManagedThreadId == _actionCallerID) 773_actionCallerID = Environment.CurrentManagedThreadId; 911if (_actionCallerID != 0 && Environment.CurrentManagedThreadId == _actionCallerID)
System\Threading\ReaderWriterLock.cs (2)
30private static readonly int DefaultSpinCount = Environment.ProcessorCount != 1 ? 500 : 0; 1002int threadID = Environment.CurrentManagedThreadId;
System.Threading.Tasks.Dataflow (2)
Base\DataflowBlock.cs (1)
425if (!Environment.HasShutdownStarted)
Internal\DataflowEtwProvider.cs (1)
143try { exceptionData = string.Join(Environment.NewLine, completionTask.Exception!.InnerExceptions.Select(static e => e.ToString())); }
System.Threading.Tasks.Parallel (12)
System\Threading\Tasks\Parallel.cs (3)
889timeoutOccursAt - Environment.TickCount64 <= 0; 892Environment.TickCount64 + timeoutLength; 950Environment.ProcessorCount :
System\Threading\Tasks\Parallel.ForEachAsync.cs (8)
19/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 37/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 55/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 197/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 213/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 352/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 368/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 502private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
System\Threading\Tasks\TaskReplicator.cs (1)
167return 100 + Random.Shared.Next(0, 50 * Environment.ProcessorCount);
System.Windows.Forms (32)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
17Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
35UIA_PROPERTY_ID.UIA_ProcessIdPropertyId => (VARIANT)Environment.ProcessId,
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (2)
53(uint)Environment.ProcessId, 62(uint)Environment.ProcessId,
System\Windows\Forms\Application.cs (7)
155=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)); 467=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); 666=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); 1309string[] arguments = Environment.GetCommandLineArgs();
System\Windows\Forms\Application.ThreadContext.cs (3)
112Debug.WriteLine(CoreSwitches.PerfTrack.Enabled, Environment.StackTrace); 187Debug.WriteLine(CoreSwitches.PerfTrack.Enabled, Environment.StackTrace); 621Environment.Exit(0);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObject.cs (1)
126UIA_PROPERTY_ID.UIA_ProcessIdPropertyId => (VARIANT)Environment.ProcessId,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (1)
31_callingStack = Environment.StackTrace;
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (1)
618Text = string.Join(Environment.NewLine, value);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (1)
22_callingStack = Environment.StackTrace;
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderer.cs (1)
1128if (Environment.OSVersion.Version >= new Version(10, 0, 22000)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
612string mshtmlPath = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.System), "mshtml.dll");
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (4)
24private Environment.SpecialFolder _rootFolder; 198[DefaultValue(Environment.SpecialFolder.Desktop)] 203public Environment.SpecialFolder RootFolder 260_rootFolder = Environment.SpecialFolder.Desktop;
System\Windows\Forms\Dialogs\CommonDialogs\SpecialFolderEnumConverter.cs (2)
29if (currentItem is Environment.SpecialFolder specialFolder && 30specialFolder.Equals(Environment.SpecialFolder.Personal))
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
179nameOfControl += $"{Environment.NewLine}\tOwnerItem: {dd.OwnerItem}";
System\Windows\Forms\SystemInformation.cs (3)
480public static string ComputerName => Environment.MachineName; 485public static string UserDomainName => Environment.UserDomainName; 524public static string UserName => Environment.UserName;
System.Windows.Forms.Analyzers.CSharp.Tests (2)
Verifiers\CSharpVerifierHelper.cs (2)
24var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory);
System.Windows.Forms.Design (11)
System\ComponentModel\Design\DesignerActionPanel.MethodLine.cs (1)
76ActionPanel.ShowError(string.Format(SR.DesignerActionPanel_ErrorInvokingAction, _methodItem!.DisplayName, Environment.NewLine + ex.Message));
System\ComponentModel\Design\Serialization\CodeDomDesignerLoader.cs (2)
350StringBuilder builder = new(Environment.NewLine); 351builder.AppendJoin(Environment.NewLine, failures);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
39_callingStack = Environment.StackTrace;
System\Windows\Forms\Design\Behavior\BehaviorService.cs (2)
751snapLineInfo = string.Join(Environment.NewLine, _testHook_RecentSnapLines) + Environment.NewLine;
System\Windows\Forms\Design\ControlDesigner.cs (1)
2500stack = string.Join(Environment.NewLine, exceptionLines.Where(l => l.Contains(typeName)));
System\Windows\Forms\Design\FolderNameEditor.FolderBrowserFolder.cs (3)
10/// <see cref="Environment.SpecialFolder"/> is also a list of CSIDL values. Unfortunately CSIDL_CONNECTIONS, 12/// <see cref="Environment.GetFolderPath(Environment.SpecialFolder)"/>.
System\Windows\Forms\Design\StringCollectionEditor.StringCollectionForm.cs (1)
187=> _textEntry.Text = string.Join(Environment.NewLine, Items);
System.Windows.Forms.Design.Tests (5)
System\Windows\Forms\Design\EmbeddedResourceTests.cs (5)
85new(ExpectedIconNamesString.Split(Environment.NewLine).Where(item => !item.EndsWith(".bmp", StringComparison.Ordinal))); 88new(ExpectedBitmapNamesString.Split(Environment.NewLine)); 138string[] expected = $"{ExpectedIconNamesString}{Environment.NewLine}{ExpectedBitmapNamesString}{Environment.NewLine}{ExpectedResourceNames}".Split(Environment.NewLine);
System.Windows.Forms.Primitives (14)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
791&& (text.Substring(lineStartIndex, lineTextLength) == Environment.NewLine
System\Windows\Forms\ObjectCache.cs (1)
19cacheSpace = Environment.Is64BitProcess ? 64 : 32;
Windows.Win32.IAdviseSinkEx.g.cs (6)
80 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 103 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 126 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 149 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 172 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 195 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows.Win32.IMessageFilter.g.cs (3)
76 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 112 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 147 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows.Win32.IRichEditOle.g.cs (2)
104 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex); 134 global::System.Environment.FailFast("COM object threw an exception from a non-HRESULT returning method.", ex);
Windows\Win32\UI\Shell\FolderBrowserHelper.cs (1)
27PInvoke.SHGetSpecialFolderLocation((int)Environment.SpecialFolder.Desktop, out rootFolderId);
System.Windows.Forms.Primitives.Tests (29)
Interop\ComCtl32\MCGRIDINFOTests.cs (8)
14if (Environment.Is64BitProcess) 25if (Environment.Is64BitProcess) 36if (Environment.Is64BitProcess) 61if (Environment.Is64BitProcess) 83if (!Environment.Is64BitProcess) 94if (!Environment.Is64BitProcess) 105if (!Environment.Is64BitProcess) 131if (!Environment.Is64BitProcess)
Interop\ComCtl32\TASKDIALOG_BUTTONTests.cs (4)
13if (Environment.Is64BitProcess) 24if (Environment.Is64BitProcess) 39if (!Environment.Is64BitProcess) 50if (!Environment.Is64BitProcess)
Interop\ComCtl32\TASKDIALOGCONFIGIconUnionTests.cs (4)
13if (Environment.Is64BitProcess) 24if (Environment.Is64BitProcess) 39if (!Environment.Is64BitProcess) 50if (!Environment.Is64BitProcess)
Interop\ComCtl32\TASKDIALOGCONFIGTests.cs (4)
13if (Environment.Is64BitProcess) 24if (Environment.Is64BitProcess) 64if (!Environment.Is64BitProcess) 75if (!Environment.Is64BitProcess)
Interop\Comdlg32\PRINTDLGWTests.cs (4)
13if (Environment.Is64BitProcess) 24if (Environment.Is64BitProcess) 56if (!Environment.Is64BitProcess) 67if (!Environment.Is64BitProcess)
Interop\Oleaut32\SAFEARRAYTests.cs (2)
20if (Environment.Is64BitProcess) 32if (!Environment.Is64BitProcess)
Interop\Oleaut32\VARIANTTests.cs (2)
37if (Environment.Is64BitProcess) 49if (!Environment.Is64BitProcess)
Interop\PARAMTests.cs (1)
32if (Environment.Is64BitProcess)
System.Windows.Forms.Primitives.TestUtilities (11)
Extensions\AssertExtensions.cs (7)
413throw new XunitException($"Expected: {string.Join(", ", expected)}{Environment.NewLine}Actual: {string.Join(", ", actual)}"); 449throw new XunitException($"Expected count: {expectedCount}{Environment.NewLine}Actual count: {actualCount}"); 462throw new XunitException($"Collections are not equal.{Environment.NewLine}Totally {countInfo.Original} {currentExpectedItem} in actual collection but expect more {currentExpectedItem}"); 483throw new XunitException($"Expected: Span of length {expected.Length}{Environment.NewLine}Actual: Span of length {actual.Length}"); 490string message = $"Showing first {MaxDiffsToShow} differences{Environment.NewLine}"; 500message += $" Position {i}: Expected: {expected[i]}, Actual: {actual[i]}{Environment.NewLine}"; 533throw new XunitException($"Expected: {expected1} || {expected2}{Environment.NewLine}Actual: {value}");
PlatformDetection.Windows.cs (4)
55File.Exists(Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "System32", "httpapi.dll")); 192Assert.True(GetProductInfo(Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor, 0, 0, out int productType));
System.Windows.Forms.Tests (104)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
865Assert.Equal(Environment.ProcessId, actual);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
29Assert.Equal(Environment.ProcessId, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ProcessIdPropertyId));
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
28Assert.Equal(Environment.ProcessId, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ProcessIdPropertyId));
System\Windows\Forms\ControlTests_InvokeAsync.cs (20)
23int? originalThread = Environment.CurrentManagedThreadId; 31newTaskThread = Environment.CurrentManagedThreadId; 44Assert.Equal(originalThread.Value, Environment.CurrentManagedThreadId); 49invokeThread = Environment.CurrentManagedThreadId; 64int? originalThread = Environment.CurrentManagedThreadId; 73newTaskThread = Environment.CurrentManagedThreadId; 89invokeThread = Environment.CurrentManagedThreadId; 101int? originalThread = Environment.CurrentManagedThreadId; 110newTaskThread = Environment.CurrentManagedThreadId; 125invokeThreadBeforeAwaitInInvokeDelegate = Environment.CurrentManagedThreadId; 129invokeThreadAfterAwaitInInvokeDelegate = Environment.CurrentManagedThreadId; 134invokeThreadAfterAwaitInInvokeDelegate = Environment.CurrentManagedThreadId; 145int? originalThread = Environment.CurrentManagedThreadId; 153newTaskThread = Environment.CurrentManagedThreadId; 168invokeThreadInInvokeDelegate = Environment.CurrentManagedThreadId; 187int? originalThread = Environment.CurrentManagedThreadId; 197newTaskThread = Environment.CurrentManagedThreadId; 213invokeThreadBeforeAwaitInInvokeDelegate = Environment.CurrentManagedThreadId; 217invokeThreadAfterAwaitInInvokeDelegate = Environment.CurrentManagedThreadId; 222invokeThreadAfterAwaitInInvokeDelegate = Environment.CurrentManagedThreadId;
System\Windows\Forms\EmbeddedResourceTests.cs (5)
200public static TheoryData<string> ExpectedIconNames() => new(ExpectedIconNamesString.Split(Environment.NewLine)); 229public static TheoryData<string> ExpectedCursorNames() => new(ExpectedCursorNamesString.Split(Environment.NewLine)); 256string allNames = $"{ExpectedIconNamesString}{Environment.NewLine}{ExpectedCursorNamesString}{Environment.NewLine}{ExpectedResourceNames}"; 257string[] expected = allNames.Split(Environment.NewLine);
System\Windows\Forms\FolderBrowserDialogTests.cs (6)
18Assert.Equal(Environment.SpecialFolder.Desktop, dialog.RootFolder); 126[InlineData(Environment.SpecialFolder.Desktop)] 127[InlineData(Environment.SpecialFolder.StartMenu)] 128public void FolderBrowserDialog_RootFolder_Set_GetReturnsExpected(Environment.SpecialFolder value) 279RootFolder = Environment.SpecialFolder.CommonAdminTools, 296Assert.Equal(Environment.SpecialFolder.Desktop, dialog.RootFolder);
System\Windows\Forms\HtmlElementTests.cs (12)
542Assert.Equal($"InnerText{Environment.NewLine}MoreText", element.InnerText); 823Assert.Equal($"{Environment.NewLine}<DIV id=id></DIV>", element.OuterHtml); 838Assert.Equal($"{Environment.NewLine}<DIV id=id><P>OuterText</P></DIV>", element.OuterHtml); 843yield return new object[] { null, $"{Environment.NewLine}<DIV id=id></DIV>" }; 844yield return new object[] { "", $"{Environment.NewLine}<DIV id=id></DIV>" }; 845yield return new object[] { "OuterText", $"{Environment.NewLine}<DIV id=id>OuterText</DIV>" }; 846yield return new object[] { "<p>OuterText</p>", $"{Environment.NewLine}<DIV id=id><P>OuterText</P></DIV>" }; 874yield return new object[] { null, $"{Environment.NewLine}<DIV id=id></DIV>" }; 875yield return new object[] { "", $"{Environment.NewLine}<DIV id=id></DIV>" }; 876yield return new object[] { "OuterText", $"{Environment.NewLine}<DIV id=id></DIV>" }; 877yield return new object[] { "<p>OuterText</p>", $"{Environment.NewLine}<DIV id=id></DIV>" }; 954Assert.Equal($"OuterText{Environment.NewLine}MoreText", element.OuterText);
System\Windows\Forms\SpecialFolderEnumConverterTests.cs (56)
19Assert.Equal(Environment.SpecialFolder.CommonDocuments, converter.ConvertFrom("CommonDocuments")); 26var expected = new Environment.SpecialFolder[] 28Environment.SpecialFolder.AdminTools, 29Environment.SpecialFolder.ApplicationData, 30Environment.SpecialFolder.CDBurning, 31Environment.SpecialFolder.CommonAdminTools, 32Environment.SpecialFolder.CommonApplicationData, 33Environment.SpecialFolder.CommonDesktopDirectory, 34Environment.SpecialFolder.CommonDocuments, 35Environment.SpecialFolder.CommonMusic, 36Environment.SpecialFolder.CommonOemLinks, 37Environment.SpecialFolder.CommonPictures, 38Environment.SpecialFolder.CommonProgramFiles, 39Environment.SpecialFolder.CommonProgramFilesX86, 40Environment.SpecialFolder.CommonPrograms, 41Environment.SpecialFolder.CommonStartMenu, 42Environment.SpecialFolder.CommonStartup, 43Environment.SpecialFolder.CommonTemplates, 44Environment.SpecialFolder.CommonVideos, 45Environment.SpecialFolder.Cookies, 46Environment.SpecialFolder.Desktop, 47Environment.SpecialFolder.DesktopDirectory, 48Environment.SpecialFolder.Favorites, 49Environment.SpecialFolder.Fonts, 50Environment.SpecialFolder.History, 51Environment.SpecialFolder.InternetCache, 52Environment.SpecialFolder.LocalApplicationData, 53Environment.SpecialFolder.LocalizedResources, 54Environment.SpecialFolder.MyComputer, 55Environment.SpecialFolder.MyDocuments, 56Environment.SpecialFolder.MyMusic, 57Environment.SpecialFolder.MyPictures, 58Environment.SpecialFolder.MyVideos, 59Environment.SpecialFolder.NetworkShortcuts, 60Environment.SpecialFolder.PrinterShortcuts, 61Environment.SpecialFolder.ProgramFiles, 62Environment.SpecialFolder.ProgramFilesX86, 63Environment.SpecialFolder.Programs, 64Environment.SpecialFolder.Recent, 65Environment.SpecialFolder.Resources, 66Environment.SpecialFolder.SendTo, 67Environment.SpecialFolder.StartMenu, 68Environment.SpecialFolder.Startup, 69Environment.SpecialFolder.System, 70Environment.SpecialFolder.SystemX86, 71Environment.SpecialFolder.Templates, 72Environment.SpecialFolder.UserProfile, 73Environment.SpecialFolder.Windows 75Assert.Equal(expected, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 80.Setup(p => p.GetReflectionType(typeof(Environment.SpecialFolder), null)) 83TypeDescriptor.AddProvider(mockProvider.Object, typeof(Environment.SpecialFolder)); 84Assert.Equal(new Environment.SpecialFolder[] { Environment.SpecialFolder.Personal }, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 85TypeDescriptor.RemoveProvider(mockProvider.Object, typeof(Environment.SpecialFolder)); 99return (TypeConverter)Activator.CreateInstance(descriptor.Converter.GetType(), new Type[] { typeof(Environment.SpecialFolder) });
System\Windows\Forms\SystemInformationTests.cs (1)
729Assert.Equal(Environment.UserDomainName, domainName);
System\Windows\Forms\WindowsFormsSynchronizationContextTests.cs (1)
159context.Send(_ => { stackTrace = Environment.StackTrace; }, null);
System.Windows.Forms.UI.IntegrationTests (2)
Infra\DataCollectionService.cs (1)
241if (Environment.GetEnvironmentVariable("XUNIT_LOGS") is { Length: > 0 } baseLogDirectory)
Infra\SendInput.cs (1)
89if (PInvokeCore.GetWindowThreadProcessId(window, out uint processId) == 0 || processId != Environment.ProcessId)
System.Xaml (1)
System\Xaml\XamlSchemaContext.cs (1)
77if (_assemblyLoadHandler is not null && !Environment.HasShutdownStarted)
SystemdTestApp (2)
Startup.cs (2)
29+ $"{Environment.NewLine}" 32var response = $"hello, world{Environment.NewLine}";
Templates.Blazor.Tests (40)
BlazorTemplateTest.cs (2)
33Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true"); 34Environment.SetEnvironmentVariable("AllowMissingPrunePackageData", "true");
BlazorWasmTemplateTest.cs (2)
171if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 207$"Couldn't find listening url:\n{string.Join(Environment.NewLine, buffer.Append(process.Error))}");
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
240{string.Join(Environment.NewLine, buffer)}");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
19Path.Combine(Environment.CurrentDirectory, "aspnetcore-https.json"), 24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}");
src\ProjectTemplates\Shared\Project.cs (5)
27var helixWorkItemUploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); 42public static string DotNetEfFullPath => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 46: Environment.GetEnvironmentVariable("DotNetEfFullPath"); 232if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 252if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath")))
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (2)
64(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 68: Path.Combine(Environment.GetEnvironmentVariable("HELIX_DIR"), "Templates", "BaseFolder");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (2)
43public static string CustomHivePath { get; } = Path.GetFullPath((string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 80if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Templates.Blazor.WebAssembly.Auth.Tests (42)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
240{string.Join(Environment.NewLine, buffer)}");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
19Path.Combine(Environment.CurrentDirectory, "aspnetcore-https.json"), 24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}");
src\ProjectTemplates\Shared\Project.cs (5)
27var helixWorkItemUploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); 42public static string DotNetEfFullPath => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 46: Environment.GetEnvironmentVariable("DotNetEfFullPath"); 232if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 252if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath")))
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (2)
64(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 68: Path.Combine(Environment.GetEnvironmentVariable("HELIX_DIR"), "Templates", "BaseFolder");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (2)
43public static string CustomHivePath { get; } = Path.GetFullPath((string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 80if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
35.AppendJoin(Environment.NewLine, logs);
src\Shared\E2ETesting\BrowserFixture.cs (4)
53var environmentOverride = Environment 164!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 178var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 239var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER");
src\Shared\E2ETesting\SauceConnectServer.cs (1)
184{string.Join(Environment.NewLine, logOutput.GetConsumingEnumerable())}.";
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Templates.Blazor.WebAssembly.Tests (42)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
240{string.Join(Environment.NewLine, buffer)}");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
19Path.Combine(Environment.CurrentDirectory, "aspnetcore-https.json"), 24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}");
src\ProjectTemplates\Shared\Project.cs (5)
27var helixWorkItemUploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); 42public static string DotNetEfFullPath => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 46: Environment.GetEnvironmentVariable("DotNetEfFullPath"); 232if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 252if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath")))
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (2)
64(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 68: Path.Combine(Environment.GetEnvironmentVariable("HELIX_DIR"), "Templates", "BaseFolder");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (2)
43public static string CustomHivePath { get; } = Path.GetFullPath((string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 80if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
35.AppendJoin(Environment.NewLine, logs);
src\Shared\E2ETesting\BrowserFixture.cs (4)
53var environmentOverride = Environment 164!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 178var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 239var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER");
src\Shared\E2ETesting\SauceConnectServer.cs (1)
184{string.Join(Environment.NewLine, logOutput.GetConsumingEnumerable())}.";
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Templates.Mvc.Tests (42)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
240{string.Join(Environment.NewLine, buffer)}");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
19Path.Combine(Environment.CurrentDirectory, "aspnetcore-https.json"), 24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}");
src\ProjectTemplates\Shared\Project.cs (5)
27var helixWorkItemUploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); 42public static string DotNetEfFullPath => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 46: Environment.GetEnvironmentVariable("DotNetEfFullPath"); 232if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 252if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath")))
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (2)
64(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 68: Path.Combine(Environment.GetEnvironmentVariable("HELIX_DIR"), "Templates", "BaseFolder");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (2)
43public static string CustomHivePath { get; } = Path.GetFullPath((string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 80if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
35.AppendJoin(Environment.NewLine, logs);
src\Shared\E2ETesting\BrowserFixture.cs (4)
53var environmentOverride = Environment 164!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 178var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 239var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER");
src\Shared\E2ETesting\SauceConnectServer.cs (1)
184{string.Join(Environment.NewLine, logOutput.GetConsumingEnumerable())}.";
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Templates.Tests (43)
GrpcTemplateTest.cs (1)
98var isWindowsOld = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Environment.OSVersion.Version < new Version(6, 2);
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
240{string.Join(Environment.NewLine, buffer)}");
src\ProjectTemplates\Shared\BlazorTemplateTest.cs (1)
47Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "true");
src\ProjectTemplates\Shared\DevelopmentCertificate.cs (3)
19Path.Combine(Environment.CurrentDirectory, "aspnetcore-https.json"), 24?? throw new InvalidOperationException($"The aspnetcore-https.json file does not exist. Searched locations: {Environment.NewLine}{string.Join(Environment.NewLine, locations)}");
src\ProjectTemplates\Shared\Project.cs (5)
27var helixWorkItemUploadRoot = Environment.GetEnvironmentVariable("HELIX_WORKITEM_UPLOAD_ROOT"); 42public static string DotNetEfFullPath => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 46: Environment.GetEnvironmentVariable("DotNetEfFullPath"); 232if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath"))) 252if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DotNetEfFullPath")))
src\ProjectTemplates\Shared\ProjectFactoryFixture.cs (2)
64(string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DIR"))) 68: Path.Combine(Environment.GetEnvironmentVariable("HELIX_DIR"), "Templates", "BaseFolder");
src\ProjectTemplates\Shared\TemplatePackageInstaller.cs (2)
43public static string CustomHivePath { get; } = Path.GetFullPath((string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 80if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
899return string.Join(Environment.NewLine, description);
src\Shared\CertificateGeneration\MacOSCertificateManager.cs (4)
25private static readonly string MacOSUserKeychain = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "/Library/Keychains/login.keychain-db"; 33private static readonly string MacOSUserHttpsCertificateLocation = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".aspnet", "dev-certs", "https");
src\Shared\CertificateGeneration\UnixCertificateManager.cs (12)
56if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName))) 96var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 131var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 227var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 393var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 522var searchPath = Environment.GetEnvironmentVariable("PATH"); 677var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 703var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 750Log.UnixHomeDirectoryDoesNotExist(homeDirectory, Environment.UserName);
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
35.AppendJoin(Environment.NewLine, logs);
src\Shared\E2ETesting\BrowserFixture.cs (4)
53var environmentOverride = Environment 164!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 178var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 239var chromeDriverPathEnvVar = Environment.GetEnvironmentVariable("CHROMEWEBDRIVER");
src\Shared\E2ETesting\SauceConnectServer.cs (1)
184{string.Join(Environment.NewLine, logOutput.GetConsumingEnumerable())}.";
src\Shared\Process\ProcessEx.cs (4)
124if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix"))) 126startInfo.EnvironmentVariables["NUGET_FALLBACK_PACKAGES"] = Environment.GetEnvironmentVariable("NUGET_FALLBACK_PACKAGES"); 228private static string GetNugetPackagesRestorePath() => (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("NUGET_RESTORE"))) 233: Environment.GetEnvironmentVariable("NUGET_RESTORE");
Test.Utilities (5)
CodeMetricsTestsBase.cs (2)
86var actualMetricsTextLines = actualMetricsText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 87var expectedMetricsTextLines = expectedMetricsText.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
CSharpCodeFixVerifier`2+Test.cs (2)
51var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory);
ObjectPool.cs (1)
110: this(factory, Environment.ProcessorCount * 2)
TestPassApp (1)
CommonControl2.cs (1)
14string executable = Environment.ProcessPath;
TestProject.IntegrationServiceA (2)
Program.cs (2)
7string? skipResourcesValue = Environment.GetEnvironmentVariable("SKIP_RESOURCES"); 35app.MapGet("/pid", () => Environment.ProcessId);
TestProject.ServiceA (1)
Program.cs (1)
13app.MapGet("/pid", () => Environment.ProcessId);
TestProject.ServiceB (1)
Program.cs (1)
8app.MapGet("/pid", () => Environment.ProcessId);
TestProject.ServiceC (1)
Program.cs (1)
8app.MapGet("/pid", () => Environment.ProcessId);
Text.Analyzers (24)
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
60if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 70Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
67private int _localRandom = Environment.TickCount; 70private static int s_sharedRandom = Environment.TickCount; 90var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\Contracts\ErrorReporting\FailFast.cs (3)
44Environment.FailFast(exception.ToString(), exception); 54Environment.FailFast(message); 110Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
112: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Dependencies\Threading\ParallelExtensions.NetFramework.cs (5)
36/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 54/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 214/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 232/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 374private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
src\RoslynAnalyzers\Utilities\Compiler\CodeMetrics\CodeAnalysisMetricData.cs (1)
173foreach (var line in child.ToString().Split([Environment.NewLine], StringSplitOptions.RemoveEmptyEntries))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
47_ => Environment.NewLine
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\LineFormattingOptions.cs (1)
19[DataMember] public string NewLine { get; init; } = Environment.NewLine;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Log\Logger.LogBlock.cs (3)
17private static readonly ObjectPool<RoslynLogBlock> s_pool = new(() => new RoslynLogBlock(s_pool!), Math.Min(Environment.ProcessorCount * 8, 256)); 49_tick = Environment.TickCount; 66var delta = Environment.TickCount - _tick;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (1)
285: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
47/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 193return _owningThreadId == Environment.CurrentManagedThreadId; 204_owningThreadId = Environment.CurrentManagedThreadId;
Text.Analyzers.UnitTests (2)
IdentifiersShouldBeSpelledCorrectlyTests.cs (2)
750string.Join(Environment.NewLine, words?.Select(x => $"<Word>{x}</Word>") ?? Enumerable.Empty<string>()); 755var contents = string.Join(Environment.NewLine, recognizedWords);
trustedroots.Tests (1)
Program.cs (1)
41if (Environment.GetEnvironmentVariable("HELIX_WORKITEM_PAYLOAD") != null)
UIAutomationClient (5)
MS\Internal\Automation\HwndProxyElementProvider.cs (3)
1614long dwTicks = (long)Environment.TickCount; 1617while (InMenuMode() && ((long)Environment.TickCount - dwTicks) < MenuTimeOut) 1747if (Environment.OSVersion.Version.Major >= 6)
MS\Internal\Automation\Misc.cs (1)
519&& System.Environment.OSVersion.Version.Major >= 6)
MS\Win32\UnsafeNativeMethods.cs (1)
175if (System.Environment.OSVersion.Version.Major >= 6)
UIAutomationClientSideProviders (32)
MS\Internal\AutomationProxies\Accessible.cs (2)
158if(Environment.OSVersion.Version.Major >= 6) 159wParam = new IntPtr(Environment.ProcessId);
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (1)
22if (Environment.OSVersion.Version.Major >= 5)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (7)
625if (Environment.OSVersion.Version.Major == 5) 637if (Environment.OSVersion.Version.Major == 5) 649if (Environment.OSVersion.Version.Major == 5) 1486if (Environment.OSVersion.Version.Major > 5 || (Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor == 1)) 1508else if (Environment.OSVersion.Version.Major == 5)
MS\Internal\AutomationProxies\Misc.cs (8)
105long dwTicks = (long)Environment.TickCount; 108while (InMenuMode() && ((long)Environment.TickCount - dwTicks) < MenuTimeOut) 285bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt) 1020&& System.Environment.OSVersion.Version.Major >= 6) 1210if (System.Environment.OSVersion.Version.Major >= 6) 1856if (Environment.OSVersion.Version.Major >= 6 && commonControlVersion >= 6) 1970Debug.Assert(System.Environment.OSVersion.Version.Major < 6); 2041Debug.Assert(System.Environment.OSVersion.Version.Major >= 6);
MS\Internal\AutomationProxies\SafeProcessHandle.cs (1)
23processId = (uint)Environment.ProcessId;
MS\Internal\AutomationProxies\WindowsButton.cs (3)
188if (Environment.OSVersion.Version.Major < 6) 288if (idEvent == InvokePattern.InvokedEvent && Environment.OSVersion.Version.Major >= 6) 555if (Environment.OSVersion.Version.Major >= 6)
MS\Internal\AutomationProxies\WindowsListView.cs (1)
907if (Environment.OSVersion.Version.Major < 6)
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
812if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1256if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd)))
MS\Internal\AutomationProxies\WindowsScrollBar.cs (2)
159if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 585if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd)))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (2)
235if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 416if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd)))
MS\Internal\AutomationProxies\WindowsTooltip.cs (1)
205if (System.Environment.OSVersion.Version.Major >= 6)
MS\Internal\AutomationProxies\WindowsTreeView.cs (1)
812if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer"))
MS\Win32\UnsafeNativeMethods.cs (1)
314if (System.Environment.OSVersion.Version.Major >= 6)
vbc (13)
src\Compilers\Shared\BuildClient.cs (1)
154var libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\ExitingTraceListener.cs (1)
58Environment.FailFast(message);
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
src\Compilers\Shared\Vbc.cs (1)
18: base(VisualBasicCommandLineParser.Default, responseFile, args, buildPaths, Environment.GetEnvironmentVariable("LIB"), analyzerLoader)
VBCSCompiler (14)
src\Compilers\Server\VBCSCompiler\ClientConnectionHandler.cs (1)
85if (!Environment.Is64BitProcess && !MemoryHelper.IsMemoryAvailable(Logger))
src\Compilers\Server\VBCSCompiler\NamedPipeClientConnectionHost.cs (1)
69var listenCount = Math.Min(4, Environment.ProcessorCount);
src\Compilers\Shared\BuildClient.cs (1)
154var libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Shared\BuildServerConnection.cs (4)
205var originalThreadId = Environment.CurrentManagedThreadId; 266var releaseThreadId = Environment.CurrentManagedThreadId; 536var environmentVariables = GetServerEnvironmentVariables(Environment.GetEnvironmentVariables(), logger); 656var userName = Environment.UserName;
src\Compilers\Shared\CompilerServerLogger.cs (3)
120loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 153var threadId = Environment.CurrentManagedThreadId; 155string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\ExitingTraceListener.cs (1)
58Environment.FailFast(message);
src\Compilers\Shared\RuntimeHostInfo.cs (3)
47if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is { Length: > 0 } pathToDotNet) 52if (Environment.GetEnvironmentVariable(DotNetExperimentalHostPathEnvironmentName) is { Length: > 0 } pathToDotNetExperimental) 76var path = Environment.GetEnvironmentVariable("PATH") ?? "";
VBCSCompiler.UnitTests (8)
BuildServerConnectionTests.cs (3)
147var currentEnvironment = Environment.GetEnvironmentVariables(); 163Assert.Equal(originalDotNetRoot, Environment.GetEnvironmentVariable(RuntimeHostInfo.DotNetRootEnvironmentName)); 180foreach (System.Collections.DictionaryEntry entry in Environment.GetEnvironmentVariables())
CompilerServerTests.cs (3)
134resetVariables.Add(variable.Key, Environment.GetEnvironmentVariable(variable.Key)); 135Environment.SetEnvironmentVariable(variable.Key, variable.Value); 144Environment.SetEnvironmentVariable(variable.Key, variable.Value);
RunKeepAliveTests.cs (1)
14public override bool ShouldSkip => Environment.GetEnvironmentVariable("RunKeepAliveTests") == null;
TouchedFileLoggingTests.cs (1)
26private static readonly string s_libDirectory = Environment.GetEnvironmentVariable("LIB");
VisualBasicRuntimeTest (1)
Program.cs (1)
61Environment.Exit(2);
Wasm.Performance.ConsoleHost (1)
src\Shared\CommandLineUtils\Utilities\DotNetMuxer.cs (1)
48if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable("helix")))
Wasm.Performance.Driver (2)
Program.cs (2)
96exceptionMessage += Environment.NewLine + "Browser state: " + Environment.NewLine + innerHtml;
WebPubSubWeb (3)
Pages_Shared__Layout_cshtml.g.cs (3)
194if (Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_ENDPOINT") is { Length: > 0 } endpointUrl) 196var headers = Environment.GetEnvironmentVariable("OTEL_EXPORTER_OTLP_HEADERS"); 197var attributes = Environment.GetEnvironmentVariable("OTEL_RESOURCE_ATTRIBUTES");
WinFormsControlsTest (5)
DragDrop.cs (2)
216? Environment.NewLine + Environment.NewLine + asciiCat
FormShowInTaskbar.cs (1)
40Text = $"Click here to test ShowInTaskbar.{Environment.NewLine}If the test result is failed, this dialog will automatically close, or it will throw an exception.",
Program.cs (2)
27Environment.Exit(-1); 30Environment.Exit(0);
WithDockerfile.AppHost (1)
Program.cs (1)
44var baseImage = Environment.GetEnvironmentVariable("BASE_IMAGE") ?? "golang:1.22-alpine";
xunit.assert (148)
Sdk\Exceptions\AllException.cs (6)
49 var wrapSpaces = Environment.NewLine + new string(' ', maxWrapIndent); 57 Environment.NewLine, 59 Environment.NewLine, 66 error.Item2.Replace(Environment.NewLine, wrapSpaces, StringComparison.Ordinal), 70 Environment.NewLine, 73 error.Item3.Message.Replace(Environment.NewLine, wrapSpaces, StringComparison.Ordinal)
Sdk\Exceptions\CollectionException.cs (9)
49 text += Environment.NewLine; 51 text += "Stack Trace:" + Environment.NewLine + filteredStack; 59 return string.Join(Environment.NewLine, lines); 81 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 83 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}{2}Error: {3}", Environment.NewLine, formattedCollection, Environment.NewLine, FormatInnerException(exception)); 103 Environment.NewLine, 105 Environment.NewLine, 107 Environment.NewLine,
Sdk\Exceptions\ContainsException.cs (13)
41 Environment.NewLine, 59 Environment.NewLine, 61 Environment.NewLine, 79 Environment.NewLine, 81 Environment.NewLine, 99 Environment.NewLine, 101 Environment.NewLine, 119 Environment.NewLine, 121 Environment.NewLine, 139 Environment.NewLine, 141 Environment.NewLine, 163 Environment.NewLine, 165 Environment.NewLine,
Sdk\Exceptions\DistinctException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\DoesNotContainException.cs (18)
50 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 52 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}", Environment.NewLine, collection); 77 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 79 message += string.Format(CultureInfo.CurrentCulture, "{0}Collection: {1}{2}Found: {3}", Environment.NewLine, collection, Environment.NewLine, item); 97 Environment.NewLine, 99 Environment.NewLine, 117 Environment.NewLine, 119 Environment.NewLine, 144 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 146 message += string.Format(CultureInfo.CurrentCulture, "{0}Memory: {1}{2}Found: {3}", Environment.NewLine, memory, Environment.NewLine, expectedSubMemory); 171 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', failurePointerIndent.Value), indexFailurePoint); 173 message += string.Format(CultureInfo.CurrentCulture, "{0}Span: {1}{2}Found: {3}", Environment.NewLine, span, Environment.NewLine, expectedSubSpan); 200 Environment.NewLine, 203 Environment.NewLine, 205 Environment.NewLine,
Sdk\Exceptions\DoesNotMatchException.cs (3)
48 Environment.NewLine, 51 Environment.NewLine, 53 Environment.NewLine,
Sdk\Exceptions\EmptyException.cs (2)
40 Environment.NewLine, 55 Environment.NewLine,
Sdk\Exceptions\EndsWithException.cs (2)
49 Environment.NewLine, 51 Environment.NewLine,
Sdk\Exceptions\EqualException.cs (11)
31 static readonly string newLineAndIndent = Environment.NewLine + new string(' ', 10); // Length of "Expected: " and "Actual: " 124 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2}{3})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex, expectedTypeText); 126 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: {1}{2}Actual: {3}", Environment.NewLine, expected, Environment.NewLine, actual); 129 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2}{3})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex, actualTypeText); 164 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: {1}{2}Actual: {3}", Environment.NewLine, formattedExpected, Environment.NewLine, formattedActual); 238 Environment.NewLine, 240 expectedText.Replace(Environment.NewLine, newLineAndIndent, StringComparison.Ordinal), 244 Environment.NewLine, 246 actualText.Replace(Environment.NewLine, newLineAndIndent, StringComparison.Ordinal)
Sdk\Exceptions\EquivalentException.cs (12)
103 Environment.NewLine, 105 Environment.NewLine, 126 Environment.NewLine, 128 Environment.NewLine, 162 Environment.NewLine, 164 Environment.NewLine, 192 Environment.NewLine, 194 Environment.NewLine, 227 Environment.NewLine, 229 Environment.NewLine, 255 Environment.NewLine, 257 Environment.NewLine,
Sdk\Exceptions\ExceptionUtility.cs (4)
50 foreach (var line in stack.Split(new[] { Environment.NewLine }, StringSplitOptions.None)) 57 return string.Join(Environment.NewLine, results.ToArray()); 93 Environment.NewLine, 95 .Split(new[] { Environment.NewLine }, StringSplitOptions.None)
Sdk\Exceptions\FalseException.cs (2)
46 Environment.NewLine, 47 Environment.NewLine,
Sdk\Exceptions\InRangeException.cs (2)
44 Environment.NewLine, 47 Environment.NewLine,
Sdk\Exceptions\IsAssignableFromException.cs (2)
50 Environment.NewLine, 52 Environment.NewLine,
Sdk\Exceptions\IsNotAssignableFromException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\IsNotTypeException.cs (2)
43 Environment.NewLine, 45 Environment.NewLine,
Sdk\Exceptions\IsTypeException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\MatchesException.cs (2)
46 Environment.NewLine, 48 Environment.NewLine,
Sdk\Exceptions\NotEqualException.cs (6)
98 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2193 (pos {2})", Environment.NewLine, new string(' ', expectedPointer.Value), mismatchedIndex); 100 message += string.Format(CultureInfo.CurrentCulture, "{0}Expected: Not {1}{2}Actual: {3}", Environment.NewLine, expected, Environment.NewLine, actual); 103 message += string.Format(CultureInfo.CurrentCulture, "{0} {1}\u2191 (pos {2})", Environment.NewLine, new string(' ', actualPointer.Value), mismatchedIndex); 160 Environment.NewLine, 162 Environment.NewLine,
Sdk\Exceptions\NotInRangeException.cs (2)
44 Environment.NewLine, 47 Environment.NewLine,
Sdk\Exceptions\NotStrictEqualException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\NullException.cs (4)
53 Environment.NewLine, 54 Environment.NewLine, 76 Environment.NewLine, 77 Environment.NewLine,
Sdk\Exceptions\ProperSubsetException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\ProperSupersetException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\RaisesAnyException.cs (2)
39 Environment.NewLine, 41 Environment.NewLine
Sdk\Exceptions\RaisesException.cs (4)
42 Environment.NewLine, 44 Environment.NewLine, 66 Environment.NewLine, 68 Environment.NewLine
Sdk\Exceptions\SameException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\SingleException.cs (6)
55 Environment.NewLine, 57 Environment.NewLine, 95 Environment.NewLine, 102 Environment.NewLine, 104 Environment.NewLine, 106 Environment.NewLine,
Sdk\Exceptions\StartsWithException.cs (2)
49 Environment.NewLine, 51 Environment.NewLine,
Sdk\Exceptions\StrictEqualException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\SubsetException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\SupersetException.cs (2)
42 Environment.NewLine, 44 Environment.NewLine,
Sdk\Exceptions\ThrowsAnyException.cs (3)
51 Environment.NewLine, 53 Environment.NewLine, 69 Environment.NewLine,
Sdk\Exceptions\ThrowsException.cs (6)
51 Environment.NewLine, 53 Environment.NewLine, 79 Environment.NewLine, 81 Environment.NewLine, 83 Environment.NewLine, 98 Environment.NewLine,
Sdk\Exceptions\TrueException.cs (2)
47 Environment.NewLine, 48 Environment.NewLine,
Sdk\Exceptions\XunitException.cs (1)
71 result = string.Format(CultureInfo.CurrentCulture, "{0}{1}{2}", result, Environment.NewLine, stackTrace);
xunit.console (5)
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\RuntimeEnvironment.cs (1)
29Environment.GetEnvironmentVariable(OverrideEnvironmentVariableName) ??
common\AssemblyResolution\Microsoft.Extensions.DependencyModel\EnvironmentWrapper.cs (1)
14return Environment.GetEnvironmentVariable(name);
common\AssemblyResolution\XunitPackageCompilationAssemblyResolver.cs (3)
42var packageDirectory = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); 49basePath = Environment.GetEnvironmentVariable("USERPROFILE"); 51basePath = Environment.GetEnvironmentVariable("HOME");