6290 references to Environment
Accessibility_Core_App (1)
CommonControl2.cs (1)
14string executable = Environment.ProcessPath;
Aspire.Azure.AI.OpenAI (1)
AzureOpenAISettings.cs (1)
81var envVar = Environment.GetEnvironmentVariable("OPENAI_EXPERIMENTAL_ENABLE_OPEN_TELEMETRY");
Aspire.Azure.Messaging.EventHubs (2)
AzureMessagingEventHubsSettings.cs (1)
75var envVar = Environment.GetEnvironmentVariable("AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE");
EventHubsComponent.cs (1)
41var identifier = $"{Environment.MachineName}-{eventHubName}-" +
Aspire.Azure.Messaging.ServiceBus (1)
AzureMessagingServiceBusSettings.cs (1)
73var envVar = Environment.GetEnvironmentVariable("AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE");
Aspire.Components.Common.Tests (4)
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 (2)
8public static bool IsRunningOnBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 9public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null;
Aspire.Dashboard (12)
Components\Pages\Traces.razor.cs (3)
91tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTraceId)], trace.TraceId); 102tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTotalTraces)], count); 105tooltip += Environment.NewLine + string.Format(CultureInfo.InvariantCulture, Loc[nameof(Dashboard.Resources.Traces.TracesTotalErroredTraces)], errorCount);
DashboardWebApplication.cs (4)
827Debug.Assert(_validationFailures.Count == 0, "Validation failures: " + Environment.NewLine + string.Join(Environment.NewLine, _validationFailures)); 833Debug.Assert(_validationFailures.Count == 0, "Validation failures: " + Environment.NewLine + string.Join(Environment.NewLine, _validationFailures));
Model\Otlp\ApplicationsSelectHelpers.cs (2)
36""", name, string.Join(Environment.NewLine, applications), string.Join(Environment.NewLine, matches));
Model\Otlp\SpanWaterfallViewModel.cs (2)
40tooltip += Environment.NewLine + "Status = Error"; 44tooltip += Environment.NewLine + $"Outgoing call to {UninstrumentedPeer}";
Model\ResourceViewModel.cs (1)
34public required ImmutableArray<EnvironmentVariableViewModel> Environment { get; init; }
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 (7)
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 (4)
13public static bool DoesNotHavePlaywrightSupport => Environment.GetEnvironmentVariable("DISABLE_PLAYWRIGHT_TESTS")?.ToLowerInvariant() is "true"; 19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
Aspire.EndToEnd.Tests (26)
tests\Shared\Playwright\PlaywrightProvider.cs (4)
13public static bool DoesNotHavePlaywrightSupport => Environment.GetEnvironmentVariable("DISABLE_PLAYWRIGHT_TESTS")?.ToLowerInvariant() is "true"; 19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
tests\Shared\WorkloadTesting\AspireProject.cs (3)
284var exceptionMessage = $"{reason}: {Environment.NewLine}{outputMessage}"; 326if (Environment.GetEnvironmentVariable("DASHBOARD_URL_FOR_TEST") is string dashboardUrlForTest) 485msg += $" Content:{Environment.NewLine}{contentStr}";
tests\Shared\WorkloadTesting\BuildEnvironment.cs (6)
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; 97string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 103throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 150EnvVars["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
tests\Shared\WorkloadTesting\CommandResult.cs (2)
39_ = message.AppendLine(CultureInfo.InvariantCulture, $"{Environment.NewLine}Standard Output:{Environment.NewLine}{Output}");
tests\Shared\WorkloadTesting\EnvironmentVariables.cs (10)
8public static readonly string? SdkForWorkloadTestingPath = Environment.GetEnvironmentVariable("SDK_FOR_WORKLOAD_TESTING_PATH"); 9public static readonly string? TestLogPath = Environment.GetEnvironmentVariable("TEST_LOG_PATH"); 10public static readonly string? SkipProjectCleanup = Environment.GetEnvironmentVariable("SKIP_PROJECT_CLEANUP"); 11public static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH"); 12public static readonly bool ShowBuildOutput = Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is "true"; 13public static readonly bool IsRunningOnCI = Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 14public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true"; 15public static readonly string BuildConfiguration = Environment.GetEnvironmentVariable("BUILD_CONFIGURATION") ?? "Debug"; 16public static readonly string? TestScenario = Environment.GetEnvironmentVariable("TEST_SCENARIO"); 17public static readonly string? DefaultTFMForTesting = Environment.GetEnvironmentVariable("DEFAULT_TFM_FOR_TESTING");
tests\Shared\WorkloadTesting\ToolCommand.cs (1)
203return string.Join(System.Environment.NewLine, outputLines);
Aspire.Hosting (10)
Dashboard\DashboardLifecycleHook.cs (1)
424(s, _) => (logMessage.Exception is { } e) ? s + Environment.NewLine + e : s);
Dashboard\ResourceSnapshot.cs (1)
25public required ImmutableArray<EnvironmentVariableSnapshot> Environment { get; init; }
Dcp\DcpDependencyCheck.cs (2)
88$"'dcp {arguments}' returned exit code {processResult.ExitCode}. {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}" 114$"{ex.Message} {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}"
Dcp\DcpHostService.cs (2)
190var arguments = $"start-apiserver --monitor {Environment.ProcessId} --detach --kubeconfig \"{locations.DcpKubeconfigPath}\""; 207foreach (DictionaryEntry de in Environment.GetEnvironmentVariables())
ProjectResourceBuilderExtensions.cs (4)
334?? Environment.GetEnvironmentVariable("DOTNET_LAUNCH_PROFILE"); 472var value = Environment.ExpandEnvironmentVariables(envVar.Value); 635var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? Environment.GetEnvironmentVariable("DOTNET_ENVIRONMENT");
Aspire.Hosting.Azure (9)
Provisioning\Provisioners\AzureProvisioner.cs (1)
211null => Environment.GetEnvironmentVariable("DOTNET_USER_SECRETS_ID"),
Provisioning\Provisioners\BicepProvisioner.cs (1)
399private static string? FindFullPathFromPath(string command) => FindFullPathFromPath(command, Environment.GetEnvironmentVariable("PATH"), Path.PathSeparator, 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.Tests (1)
AzureBicepResourceTests.cs (1)
192bicepResource.Resource.TempDirectory = Environment.CurrentDirectory;
Aspire.Hosting.Dapr (9)
DaprDistributedApplicationLifecycleHook.cs (9)
319var pathRoot = Path.GetPathRoot(Environment.GetFolderPath(Environment.SpecialFolder.Windows)) ?? "C:"; 328var homePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 338if (OperatingSystem.IsMacOS() && Environment.GetEnvironmentVariable("HOMEBREW_PREFIX") is string homebrewPrefix) 411string userDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 434string userDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
Aspire.Hosting.Testing (1)
DistributedApplicationFactory.cs (1)
304if (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 (27)
Dashboard\DashboardLifecycleHookTests.cs (1)
175$"Error message{Environment.NewLine}System.InvalidOperationException: Error!",
Dcp\ApplicationExecutorTests.cs (18)
108var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 140var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 172var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 205var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 242builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 259builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 293builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 327builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo") 394var exe = builder.AddExecutable("CoolProgram", "cool", Environment.CurrentDirectory, "--alpha", "--bravo"); 485await pipes.StandardOut.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:33.473275911Z Hello world" + Environment.NewLine)); 496await pipes.StandardErr.Writer.WriteAsync(Encoding.UTF8.GetBytes("2024-08-19T06:10:32.661Z Next" + Environment.NewLine)); 539return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:01.000Z First" + Environment.NewLine)); 541return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:02.000Z Second" + Environment.NewLine)); 543return new MemoryStream(Encoding.UTF8.GetBytes("2024-08-19T06:10:03.000Z Third" + Environment.NewLine)); 546"2024-08-19T06:10:05.000Z Sixth" + Environment.NewLine + 547"2024-08-19T06:10:05.000Z Seventh" + Environment.NewLine + 548"2024-08-19T06:10:04.000Z Forth" + Environment.NewLine + 549"2024-08-19T06:10:04.000Z Fifth" + Environment.NewLine));
MSBuildTests.cs (1)
120Assert.True(process.ExitCode == 0, $"Build failed: {Environment.NewLine}{output}");
ProjectResourceTests.cs (1)
485: $",{Environment.NewLine} \"ASPNETCORE_FORWARDEDHEADERS_ENABLED\": \"true\"";
Schema\SchemaTests.cs (1)
752Assert.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);
Utils\ManifestUtils.cs (2)
22manifestDirectory ??= Environment.CurrentDirectory; 44var context = new ManifestPublishingContext(executionContext, Path.Combine(Environment.CurrentDirectory, "manifest.json"), writer);
Aspire.OpenAI (1)
OpenAISettings.cs (1)
66var envVar = Environment.GetEnvironmentVariable("OPENAI_EXPERIMENTAL_ENABLE_OPEN_TELEMETRY");
Aspire.Playground.Tests (8)
AppHostTests.cs (1)
24private static readonly string? s_appHostNameFilter = Environment.GetEnvironmentVariable("TEST_PLAYGROUND_APPHOST_FILTER");
tests\Aspire.Components.Common.Tests\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.Components.Common.Tests\PlatformDetection.cs (2)
8public static bool IsRunningOnBuildMachine => Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 9public static bool IsRunningOnHelix => Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null;
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.Workload.Tests (26)
tests\Shared\Playwright\PlaywrightProvider.cs (4)
13public static bool DoesNotHavePlaywrightSupport => Environment.GetEnvironmentVariable("DISABLE_PLAYWRIGHT_TESTS")?.ToLowerInvariant() is "true"; 19string? browserPath = Environment.GetEnvironmentVariable(BrowserPathEnvironmentVariableName); 42if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName))) 58Environment.SetEnvironmentVariable(PlaywrightBrowsersPathEnvironmentVariableName, probePath);
tests\Shared\WorkloadTesting\AspireProject.cs (3)
284var exceptionMessage = $"{reason}: {Environment.NewLine}{outputMessage}"; 326if (Environment.GetEnvironmentVariable("DASHBOARD_URL_FOR_TEST") is string dashboardUrlForTest) 485msg += $" Content:{Environment.NewLine}{contentStr}";
tests\Shared\WorkloadTesting\BuildEnvironment.cs (6)
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; 97string? dotnetPath = Environment.GetEnvironmentVariable("PATH")! 103throw new ArgumentException($"Could not find dotnet.exe in PATH={Environment.GetEnvironmentVariable("PATH")}"); 150EnvVars["PATH"] = $"{sdkForWorkloadPath}{Path.PathSeparator}{Environment.GetEnvironmentVariable("PATH")}";
tests\Shared\WorkloadTesting\CommandResult.cs (2)
39_ = message.AppendLine(CultureInfo.InvariantCulture, $"{Environment.NewLine}Standard Output:{Environment.NewLine}{Output}");
tests\Shared\WorkloadTesting\EnvironmentVariables.cs (10)
8public static readonly string? SdkForWorkloadTestingPath = Environment.GetEnvironmentVariable("SDK_FOR_WORKLOAD_TESTING_PATH"); 9public static readonly string? TestLogPath = Environment.GetEnvironmentVariable("TEST_LOG_PATH"); 10public static readonly string? SkipProjectCleanup = Environment.GetEnvironmentVariable("SKIP_PROJECT_CLEANUP"); 11public static readonly string? BuiltNuGetsPath = Environment.GetEnvironmentVariable("BUILT_NUGETS_PATH"); 12public static readonly bool ShowBuildOutput = Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is "true"; 13public static readonly bool IsRunningOnCI = Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") is not null; 14public static readonly bool TestsRunningOutsideOfRepo = Environment.GetEnvironmentVariable("TestsRunningOutsideOfRepo") is "true"; 15public static readonly string BuildConfiguration = Environment.GetEnvironmentVariable("BUILD_CONFIGURATION") ?? "Debug"; 16public static readonly string? TestScenario = Environment.GetEnvironmentVariable("TEST_SCENARIO"); 17public static readonly string? DefaultTFMForTesting = Environment.GetEnvironmentVariable("DEFAULT_TFM_FOR_TESTING");
tests\Shared\WorkloadTesting\ToolCommand.cs (1)
203return string.Join(System.Environment.NewLine, outputLines);
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);
BuildActionTelemetryTable (3)
Program.cs (3)
461var currentDirectory = new Uri(Environment.CurrentDirectory + "\\"); 541Console.WriteLine($"Descriptions were missing for the following type names:{Environment.NewLine}{string.Join(Environment.NewLine, missingDescriptions)}");
BuildValidator (3)
LocalReferenceResolver.cs (3)
95var nugetPackageDirectory = Environment.GetEnvironmentVariable("NUGET_PACKAGES"); 96nugetPackageDirectory ??= 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")))
ConfigurationSchemaGenerator (2)
ConfigSchemaGenerator.cs (2)
35if (!schema.EndsWith(Environment.NewLine)) 38schema += Environment.NewLine;
CreateDefaultBuilderApp (1)
Program.cs (1)
42var contentRoot = Environment.GetEnvironmentVariable("ASPNETCORE_CONTENTROOT");
CreateDefaultBuilderOfTApp (1)
Program.cs (1)
54var 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 (9)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (3)
119loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 152var threadId = Environment.CurrentManagedThreadId; 154string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\BuildClient.cs (1)
154var libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Shared\BuildServerConnection.cs (3)
207var originalThreadId = Environment.CurrentManagedThreadId; 268var releaseThreadId = Environment.CurrentManagedThreadId; 553var userName = Environment.UserName;
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);
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)
166text = 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-dev-certs (23)
Program.cs (3)
367"already trusted we will run the following command:" + Environment.NewLine + 369Environment.NewLine + "This command might prompt you for your password to install the certificate " + 370"on the keychain. To undo these changes: 'security remove-trusted-cert <<certificate>>'" + Environment.NewLine);
src\Shared\CertificateGeneration\CertificateManager.cs (1)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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-getdocument (4)
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);
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 (70)
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)
356throw 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)
363index += Environment.NewLine.Length; 420if ((index + Environment.NewLine.Length) > text.Length) 425for (int i = 0; i < Environment.NewLine.Length; i++) 427if (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() + ")";
Metadata\ServiceDescriptor.cs (1)
110tfn = Environment.Version.Major >= 8 ? "net8.0" : "net6.0";
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 (15)
Commands\CreateCommand.cs (11)
129var optionsString = schemeNameOption.HasValue() ? $"{Resources.JwtPrint_Scheme}: {scheme}{Environment.NewLine}" : string.Empty; 131var name = nameOption.HasValue() ? nameOption.Value() : Environment.UserName; 132optionsString += $"{Resources.JwtPrint_Name}: {name}{Environment.NewLine}"; 135optionsString += audienceOption.HasValue() ? $"{Resources.JwtPrint_Audiences}: {string.Join(", ", audience)}{Environment.NewLine}" : string.Empty; 142optionsString += issuerOption.HasValue() ? $"{Resources.JwtPrint_Issuer}: {issuer}{Environment.NewLine}" : string.Empty; 152optionsString += $"{Resources.JwtPrint_NotBefore}: {notBefore:O}{Environment.NewLine}"; 171optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 191optionsString += $"{Resources.JwtPrint_ExpiresOn}: {expiresOn:O}{Environment.NewLine}"; 196optionsString += rolesOption.HasValue() ? $"{Resources.JwtPrint_Roles}: [{string.Join(", ", roles)}]{Environment.NewLine}" : string.Empty; 199optionsString += scopesOption.HasValue() ? $"{Resources.JwtPrint_Scopes}: {string.Join(", ", scopes)}{Environment.NewLine}" : string.Empty; 209optionsString += $"{Resources.JwtPrint_CustomClaims}: [{string.Join(", ", claims.Select(kvp => $"{kvp.Key}={kvp.Value}"))}]{Environment.NewLine}";
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} ");
EventHubsConsumer (1)
Program.cs (1)
9bool useConsumer = Environment.GetEnvironmentVariable("USE_EVENTHUBCONSUMERCLIENT") == "yes";
GetDocument.Insider (5)
.packages\microsoft.extensions.hostfactoryresolver.sources\10.0.0-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
33if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds))
Commands\GetDocumentCommandWorker.cs (1)
308writer.WriteLine(string.Join(Environment.NewLine, filePathList));
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);
HealthChecksSample (1)
LivenessProbeStartup.cs (1)
60await context.Response.WriteAsync(Environment.NewLine);
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)
198builder.Append(Environment.NewLine); 208builder.Append(Environment.NewLine); 220builder.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)
46var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 56var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
CSharpIdeAnalyzerBenchmarks.cs (1)
37var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
FindReferencesBenchmarks.cs (2)
43var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 53var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
FormatterBenchmarks.cs (8)
30var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 40.Replace($"{{{Environment.NewLine}{Environment.NewLine}", "{") 41.Replace($"}}{Environment.NewLine}{Environment.NewLine}", "}") 42.Replace($"{{{Environment.NewLine}", "{") 43.Replace($"}}{Environment.NewLine}", "}") 44.Replace($";{Environment.NewLine}", ";");
IncrementalAnalyzerBenchmarks.cs (1)
35var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
IncrementalSourceGeneratorBenchmarks.cs (3)
52var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 62var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 182Environment.Exit(0);
NavigateToBenchmarks.cs (2)
49var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName); 59var roslynRoot = Environment.GetEnvironmentVariable(Program.RoslynRootPathEnvVariableName);
Program.cs (1)
42Environment.SetEnvironmentVariable(RoslynRootPathEnvVariableName, GetRoslynRootLocation());
RenameBenchmarks.cs (1)
28var 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 (18)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (2)
50var username = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_USER"); 51var password = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_PASSWORD");
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
49var message = i + Environment.NewLine; 91var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
165if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 234if (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)
260var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
59Assert.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)
56if (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 (14)
src\Servers\IIS\IIS\test\Common.FunctionalTests\BasicAuthTests.cs (2)
50var username = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_USER"); 51var password = Environment.GetEnvironmentVariable("ASPNETCORE_MODULE_TEST_PASSWORD");
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (2)
49var message = i + Environment.NewLine; 91var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\Http2Tests.cs (2)
165if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 234if (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)
260var message = i + Environment.NewLine;
src\Servers\IIS\IIS\test\Common.FunctionalTests\WindowsAuthTests.cs (1)
59Assert.Contains(Environment.UserName, responseText);
UpgradeFeatureDetectionTests.cs (1)
20private 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)
244 _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"); 239result = 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 (16)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (16)
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); 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)
43if (Environment.GetEnvironmentVariable("DOTNET_ROOT") == null) 56Environment.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)
1057Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception); 1143Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception);
Http3\Http3TlsTests.cs (2)
509var appData = Environment.GetEnvironmentVariable("APPDATA"); 510var 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}";
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)
256string cwd = System.Environment.CurrentDirectory; 257if (!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"), 366Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT") :
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (9)
UserJwtsTests.cs (9)
99Assert.Equal($"Hello {Environment.UserName}!", await client.GetStringAsync("/secret")); 275Assert.Contains($"Name: {Environment.UserName}", output); 289Assert.Contains($"Name: {Environment.UserName}", output); 304Assert.Contains($"Name: {Environment.UserName}", output); 336Assert.Contains($"Name: {Environment.UserName}", output); 356Assert.Equal(Environment.UserName, deserialized.Name); 375Assert.Contains($"Name: {Environment.UserName}", output); 396Assert.Contains($"Name: {Environment.UserName}", output); 416Assert.Equal(Environment.UserName, deserialized.Name);
Microsoft.AspNetCore.Authentication.Test (1)
TwitterTests.cs (1)
300var 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)
233$"when also used to capture unmatched values. Unmatched values:" + Environment.NewLine + 234string.Join(Environment.NewLine, unmatched.Keys)); 254$"per type can use '{nameof(ParameterAttribute)}.{nameof(ParameterAttribute.CaptureUnmatchedValues)}'. Properties:" + Environment.NewLine + 255string.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.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 (6)
Hosting\WebAssemblyCultureProvider.cs (1)
49if (Environment.GetEnvironmentVariable("__BLAZOR_SHARDED_ICU") == "1" &&
Hosting\WebAssemblyHost.cs (1)
160if (Environment.GetEnvironmentVariable("__BLAZOR_WEBASSEMBLY_WAIT_FOR_ROOT_COMPONENTS") == "true")
HotReload\WebAssemblyHotReload.cs (1)
31if (Environment.GetEnvironmentVariable("__ASPNETCORE_BROWSER_TOOLS") == "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 (5)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (1)
26=> Environment.GetEnvironmentVariable(name) is { Length: > 0 } value ? value : null;
ComponentWebAssemblyConventions.cs (1)
15=> 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)
31Environment.SetEnvironmentVariable("__BLAZOR_SHARDED_ICU", "1"); 47Environment.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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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 (9)
Internal\HostingLoggerExtensions.cs (1)
35message = message + Environment.NewLine + ex.Message;
Internal\WebHostLifetime.cs (1)
56Environment.ExitCode = 0;
src\Shared\RazorViews\BaseView.cs (1)
283return string.Join("<br />" + Environment.NewLine,
WebHostBuilder.cs (6)
48UseSetting(WebHostDefaults.EnvironmentKey, Environment.GetEnvironmentVariable("Hosting:Environment") 49?? Environment.GetEnvironmentVariable("ASPNET_ENV")); 55UseSetting(WebHostDefaults.ServerUrlsKey, Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS")); 144if (Environment.GetEnvironmentVariable("Hosting:Environment") != null) 149if (Environment.GetEnvironmentVariable("ASPNET_ENV") != null) 154if (Environment.GetEnvironmentVariable("ASPNETCORE_SERVER.URLS") != null)
Microsoft.AspNetCore.Hosting.Tests (4)
GenericWebHostBuilderTests.cs (4)
21Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 27Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, null); 34Environment.SetEnvironmentVariable("ASPNETCORE_" + randomEnvKey, "true"); 40Environment.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.Extensions.Tests (3)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (3)
357? Path.Combine(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT"), "RequestDelegateGenerator", "Baselines") 368newSource += Environment.NewLine; 377.Split(Environment.NewLine);
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 (16)
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 (3)
1280var lines = requestLog.Message.Split(Environment.NewLine); 1528var lines = Assert.Single(TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Information)).Message.Split(Environment.NewLine); 1590var lines = Assert.Single(TestSink.Writes).Message.Split(Environment.NewLine);
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)
157await UpdateFile("/Pages/UpdateablePage.cshtml", "@page" + Environment.NewLine + "@GetType().Assembly");
RazorRuntimeCompilationHostingStartupTest.cs (1)
102await 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)
358builder.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)
862Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 894Assert.Equal(Environment.NewLine + "<script>(isavailable()||document.write(\"JavaScriptEncode[[<script " + 907Environment.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-alpha.1.24619.8\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.Tests (1)
Integration\OpenApiDocumentIntegrationTests.cs (1)
28? 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)
18internal static readonly int DefaultMaxAccepts = 5 * Environment.ProcessorCount; 74/// 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)
169Assert.True(Environment.OSVersion.Version < new Version(10, 0, 22000), "This should be supported on Win 11.");
Http2Tests.cs (2)
196if (Environment.OSVersion.Version < new Version(10, 0, 19041, 0)) 260if (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)
40IsWin8orLater = (Environment.OSVersion.Version >= win8Version);
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
Utilities.cs (1)
24IsWin8orLater = (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)
523if (Environment.OSVersion.Version < new Version(6, 3) // Missing ALPN support 525|| (Environment.OSVersion.Version < new Version(10, 0) && !enableHttp2OnWindows81))
src\Shared\CertificateGeneration\CertificateManager.cs (1)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
186var appData = Environment.GetEnvironmentVariable("APPDATA"); 187var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (14)
DiagnosticMemoryPoolTests.cs (4)
117Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 132Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", exception.Message); 154Assert.Equal($"Cannot access a disposed object.{Environment.NewLine}Object name: 'MemoryPoolBlock'.", ode.Message); 171Assert.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)
1867var appData = Environment.GetEnvironmentVariable("APPDATA"); 1868var home = Environment.GetEnvironmentVariable("HOME");
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
NamedPipeTransportOptions.cs (2)
18/// Defaults to <see cref="Environment.ProcessorCount" /> rounded down and clamped between 1 and 16. 20public 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)
36/// 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)
62foreach (var dir in Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator)) 132output = output.Trim().Replace(Environment.NewLine, ""); 135Environment.SetEnvironmentVariable("REDIS_CONNECTION", $"{output}:6379"); 166throw new Exception($"Command '{fileName} {arguments}' failed with exit code '{exitCode}'. Output:{Environment.NewLine}{output}"); 180output = string.Join(Environment.NewLine, lines.ToArray()); 189output = 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-alpha.1.24619.8\contentFiles\cs\netstandard2.0\HostFactoryResolver.cs (1)
33if (uint.TryParse(Environment.GetEnvironmentVariable(TimeoutEnvironmentKey), out uint timeoutInSeconds))
Microsoft.AspNetCore.TestHost.Tests (2)
HttpContextBuilderTests.cs (2)
126var bytes = Encoding.UTF8.GetBytes("BodyStarted" + Environment.NewLine); 153await c.Response.WriteAsync("BodyStarted" + Environment.NewLine);
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
651Assert.Equal(NormalizePath(Environment.CurrentDirectory), NormalizePath(builder.Environment.ContentRootPath)); 667options.StartInfo.WorkingDirectory = Environment.SystemDirectory;
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 (156)
BackEnd\BuildManager\BuildManager.cs (6)
753switch (Environment.GetEnvironmentVariable("MSBuildDebugBuildManagerOnStart")) 1059else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILD_HOST_NAME"))) 1061host = Environment.GetEnvironmentVariable("MSBUILD_HOST_NAME"); 1063else if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSCODE_CWD")) || Environment.GetEnvironmentVariable("TERM_PROGRAM") == "vscode") 2175if (Environment.GetEnvironmentVariable("MSBUILDCLEARXMLCACHEONBUILDMANAGER") == "1")
BackEnd\BuildManager\BuildParameters.cs (5)
412set => _enableNodeReuse = Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1" ? false : value; 946backing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable(environmentVariable)) || @default; 959string environmentValue = Environment.GetEnvironmentVariable(environmentVariable); 984if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1") // For example to disable node reuse within Visual Studio 989if (Environment.GetEnvironmentVariable("MSBUILDDETAILEDSUMMARY") == "1") // For example to get detailed summary within Visual Studio
BackEnd\Client\MSBuildClient.cs (1)
505foreach (DictionaryEntry envVar in Environment.GetEnvironmentVariables())
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
125_debugForceCaching = Environment.GetEnvironmentVariable("MSBUILDDEBUGFORCECACHING") == "1";
BackEnd\Components\Caching\ConfigCache.cs (2)
45if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDCONFIGCACHESWEEPTHRESHHOLD"), out _sweepThreshhold)) 280if (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEAGGRESSIVECACHING")))
BackEnd\Components\Communications\DetouredNodeLauncher.cs (1)
148foreach (DictionaryEntry baseVar in Environment.GetEnvironmentVariables())
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)
228if (Environment.GetEnvironmentVariable("MSBUILDINPROCENVCHECK") == "1")
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
209string msbuildExeName = Environment.GetEnvironmentVariable("MSBUILD_EXE_NAME");
BackEnd\Components\Communications\NodeProviderOutOfProcTaskHost.cs (4)
149s_msbuildTaskHostName = Environment.GetEnvironmentVariable("MSBUILDTASKHOST_EXE_NAME"); 386s_msbuildName = Environment.GetEnvironmentVariable("MSBUILD_EXE_NAME"); 425s_pathToX64Clr2 = Environment.GetEnvironmentVariable("MSBUILDTASKHOSTLOCATION64"); 439s_pathToX32Clr2 = Environment.GetEnvironmentVariable("MSBUILDTASKHOSTLOCATION");
BackEnd\Components\Logging\LoggingService.cs (1)
310string 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\Logging\TargetLoggingContext.cs (1)
24private static bool s_enableTargetOutputLogging = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"));
BackEnd\Components\ProjectCache\ProjectCacheService.cs (1)
33private static readonly ParallelOptions s_parallelOptions = new() { MaxDegreeOfParallelism = Environment.ProcessorCount };
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
688if (Environment.GetEnvironmentVariable("MSBUILDFORCESTA") == "1") 1349Environment.SetEnvironmentVariable(entry.Key, null); 1367Environment.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)
811if (ExceptionHandling.IsCriticalException(ex) || Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1") 902if (ExceptionHandling.IsCriticalException(taskException) || (Environment.GetEnvironmentVariable("MSBUILDDONOTCATCHTASKEXCEPTIONS") == "1"))
BackEnd\Components\RequestBuilder\TaskHost.cs (3)
45private static bool s_breakOnLogAfterTaskReturns = Environment.GetEnvironmentVariable("MSBUILDBREAKONLOGAFTERTASKRETURNS") == "1"; 1030string initialLeaseTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDENGINEPROXYINITIALLEASETIME"); 1051string leaseExtensionTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDENGINEPROXYLEASEEXTENSIONTIME");
BackEnd\Components\Scheduler\Scheduler.cs (6)
185_schedulingUnlimitedVariable = Environment.GetEnvironmentVariable("MSBUILDSCHEDULINGUNLIMITED"); 196string strNodeLimitOffset = Environment.GetEnvironmentVariable("MSBUILDNODELIMITOFFSET"); 211if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDCORELIMIT"), out _coreLimit) || _coreLimit <= 0) 218if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDNODECOREALLOCATIONWEIGHT"), out _nodeCoreAllocationWeight) 856string customScheduler = Environment.GetEnvironmentVariable("MSBUILDCUSTOMSCHEDULER"); 901string multiplier = Environment.GetEnvironmentVariable("MSBUILDCUSTOMSCHEDULERFORSQLCONFIGURATIONLIMITMULTIPLIER");
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (3)
26private readonly string IncludeDefaultResolver = Environment.GetEnvironmentVariable("MSBUILDINCLUDEDEFAULTSDKRESOLVER"); 30private readonly string AdditionalResolversFolder = Environment.GetEnvironmentVariable( 36?? Environment.GetEnvironmentVariable("MSBUILDADDITIONALSDKRESOLVERSFOLDER");
BackEnd\Components\SdkResolution\SdkResolverService.cs (3)
253loggingContext.LogError(new BuildEventFileInfo(sdkReferenceLocation), "FailedToResolveSDK", sdk.Name, string.Join($"{Environment.NewLine} ", errors)); 375string resultWarnings = result.Warnings?.Any() == true ? string.Join(Environment.NewLine, result.Warnings) : "null"; 376string resultErrors = result.Errors?.Any() == true ? string.Join(Environment.NewLine, result.Errors) : "null";
BackEnd\Node\OutOfProcNode.cs (5)
546if (Environment.GetEnvironmentVariable("MSBUILDCLEARXMLCACHEONCHILDNODES") == "1") 718Environment.SetEnvironmentVariable(key, null); 725Environment.SetEnvironmentVariable(environmentPair.Key, environmentPair.Value); 805string forwardPropertiesFromChild = Environment.GetEnvironmentVariable("MSBUILDFORWARDPROPERTIESFROMCHILD"); 817string forwardAllProperties = Environment.GetEnvironmentVariable("MSBUILDFORWARDALLPROPERTIESFROMCHILD");
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
984Environment.NewLine + e.InnerException);
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); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommunicationsUtilities.cs (2)
101string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 705string environmentValue = Environment.GetEnvironmentVariable(environmentVariable);
Construction\ProjectElementContainer.cs (2)
568var leadingWhitespaceNode = XmlDocument.CreateWhitespace(Environment.NewLine + parentIndentation + DEFAULT_INDENT); 569var trailingWhiteSpaceNode = XmlDocument.CreateWhitespace(Environment.NewLine + parentIndentation);
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 68return ScanNodeMode(Environment.CommandLine); 93var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
Definition\Project.cs (1)
54private 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))
EnvironmentUtilities.cs (1)
14Environment.Is64BitOperatingSystem;
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
Evaluation\ConditionEvaluator.cs (1)
174private static readonly bool s_disableExpressionCaching = (Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEEXPRESSIONS") == "1");
Evaluation\Expander.cs (1)
5087if (Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1")
Evaluation\ItemSpec.cs (1)
585_normalize = options == MatchOnMetadataOptions.PathLike ? (Func<string, string>)(p => FileUtilities.NormalizePathForComparisonNoThrow(p, Environment.CurrentDirectory)) : p => p;
Evaluation\ProjectRootElementCache.cs (3)
77int.TryParse(Environment.GetEnvironmentVariable("MSBUILDPROJECTROOTELEMENTCACHESIZE"), out int cacheSize) ? cacheSize : 200; 82private static bool s_debugLogCacheActivity = Environment.GetEnvironmentVariable("MSBUILDDEBUGXMLCACHE") == "1"; 90private static bool s_сheckFileContent = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDCACHECHECKFILECONTENT"));
ExceptionHandling.cs (3)
397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
FrameworkLocationHelper.cs (10)
137internal static readonly string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); 734string complusInstallRoot = Environment.GetEnvironmentVariable("COMPLUS_INSTALLROOT"); 735string complusVersion = Environment.GetEnvironmentVariable("COMPLUS_VERSION"); 787string complusInstallRoot = Environment.GetEnvironmentVariable("COMPLUS_INSTALLROOT"); 788string complusVersion = Environment.GetEnvironmentVariable("COMPLUS_VERSION"); 878string programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 900programFilesX64 = Environment.GetEnvironmentVariable("ProgramW6432"); 918string combinedPath = Environment.GetEnvironmentVariable("ReferenceAssemblyRoot");
Instance\ProjectInstance.cs (3)
2949foreach (DictionaryEntry environmentVariable in Environment.GetEnvironmentVariables()) 2966Environment.SetEnvironmentVariable(environmentVariableName, null); 2979Environment.SetEnvironmentVariable(clearedVariable.Key as string, clearedVariable.Value as string);
Instance\TaskFactories\AssemblyTaskFactory.cs (2)
285ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, loadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString()); 436ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskLoadFailure", taskName, _loadedType.Assembly.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Instance\TaskFactoryLoggingHost.cs (2)
269string initialLeaseTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDENGINEPROXYINITIALLEASETIME"); 290string leaseExtensionTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDENGINEPROXYLEASEEXTENSIONTIME");
Instance\TaskRegistry.cs (2)
70private static bool s_forceTaskHostLaunch = (Environment.GetEnvironmentVariable("MSBUILDFORCEALLTASKSOUTOFPROC") == "1"); 1434ProjectErrorUtilities.ThrowInvalidProject(elementLocation, "TaskFactoryLoadFailure", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation, Environment.NewLine + e.InnerException.ToString());
Logging\BaseConsoleLogger.cs (3)
143WriteHandler(Environment.NewLine); 884Traits.LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")); 909showTargetOutputs = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"));
Logging\BinaryLogger\BinaryLogger.cs (8)
164_initialTargetOutputLogging = Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"); 166_initialIsBinaryLoggerEnabled = Environment.GetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED"); 168Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "true"); 169Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", "1"); 170Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", bool.TrueString); 315Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging); 316Environment.SetEnvironmentVariable("MSBUILDLOGIMPORTS", _initialLogImports ? "1" : null); 317Environment.SetEnvironmentVariable("MSBUILDBINARYLOGGERENABLED", _initialIsBinaryLoggerEnabled);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
1824if (!Environment.Is64BitProcess)
Logging\OptimizedStringIndenter.cs (1)
64int indentedStringLength = segments.Length * (Environment.NewLine.Length + indent);
Logging\ParallelLogger\ConsoleOutputAligner.cs (1)
59int estimatedCapacity = message.Length + ((prefixAlreadyWritten ? 0 : prefixWidth) + Environment.NewLine.Length) * (message.Length / averageLineLength + 1);
Logging\ParallelLogger\ParallelConsoleLogger.cs (1)
1411WriteHandler(nonNullMessage + Environment.NewLine);
LogMessagePacketBase.cs (2)
266private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
Modifiers.cs (1)
31private static readonly bool s_traceModifierCasing = (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTRACEMODIFIERCASING")));
Resources\Constants.cs (1)
291var environmentType = new Tuple<string, Type>(null, typeof(Environment));
TaskLoggingHelper.cs (5)
944if (!showDetail && (Environment.GetEnvironmentVariable("MSBUILDDIAGNOSTICS") == null)) // This env var is also used in ToolTask 950message += Environment.NewLine + exception.StackTrace; 1287message += Environment.NewLine + exception.StackTrace; 1483string initialLeaseTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDTASKLOGGINGHELPERINITIALLEASETIME"); 1503string leaseExtensionTimeFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDTASKLOGGINGHELPERLEASEEXTENSIONTIME");
TempFileUtilities.cs (1)
44msbuildTempFolderPrefix + Environment.UserName;
Tracing.cs (2)
60string val = Environment.GetEnvironmentVariable("MSBUILDTRACEINTERVAL"); 121Trace.WriteLine(System.Environment.StackTrace);
Utilities\EngineFileUtilities.cs (1)
539string wildCards = Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes");
Utilities\NuGetFrameworkWrapper.cs (1)
184{(Environment.Is64BitProcess ? _bindingRedirects64 : _bindingRedirects32)}
Utilities\Utilities.cs (13)
35private static bool s_shouldTreatHigherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT") != null); 41private static bool s_shouldTreatOtherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT") != null); 48private static bool s_uselegacyDefaultToolsVersionBehavior = (Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION") != null); 53private static string s_defaultToolsVersionFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 69s_shouldTreatHigherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT") != null); 70s_shouldTreatOtherToolsVersionsAsCurrent = (Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT") != null); 71s_uselegacyDefaultToolsVersionBehavior = (Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION") != null); 72s_defaultToolsVersionFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 515bool useLegacyMSBuildExtensionsPathBehavior = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH")); 543localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 548localAppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
Microsoft.Build.BuildCheck.UnitTests (2)
EndToEndTests.cs (2)
143$"Resource for culture {culture} was {(isResourceExpected ? "not " : "")}found in deps.json:{Environment.NewLine}{output.DepsJsonResources.ToString()}"); 148$"Unexpected resource for culture {culture} was found in deps.json:{Environment.NewLine}{output.DepsJsonResources.ToString()}");
Microsoft.Build.CommandLine.UnitTests (18)
CommandLineSwitches_Tests.cs (1)
1550string[] helpMessageLines = item.Value.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
MSBuildServer_Tests.cs (6)
155Environment.SetEnvironmentVariable("MSBUILDUSESERVER", ""); 162Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 213Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "0"); 219Environment.SetEnvironmentVariable("MSBUILDUSESERVER", "1"); 329output.ShouldContain($@":MSBuildStartupDirectory:{Environment.CurrentDirectory}:"); 341output.ShouldContain($@":MSBuildStartupDirectory:{Environment.CurrentDirectory}:");
XMake_Tests.cs (11)
564output.EndsWith(Environment.NewLine).ShouldBeTrue(); 608output.EndsWith(Environment.NewLine).ShouldBeFalse(); 616string oldValueForMSBuildLoadMicrosoftTargetsReadOnly = Environment.GetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly"); 630Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly); 914var originalUILanguage = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE); 1104Environment.SetEnvironmentVariable("MyEnvVariable", "1"); 1118Environment.SetEnvironmentVariable("MyEnvVariable", null); 1130string oldValueForMSBuildLoadMicrosoftTargetsReadOnly = Environment.GetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly"); 1179Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", oldValueForMSBuildLoadMicrosoftTargetsReadOnly); 1184? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "notepad.exe")
Microsoft.Build.Engine.OM.UnitTests (31)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
Construction\WhiteSpacePreservation_Tests.cs (1)
503if (Environment.NewLine.Length == 2)
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 68return ScanNodeMode(Environment.CommandLine); 93var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_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)
2468<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)
67Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
TempFileUtilities.cs (1)
44msbuildTempFolderPrefix + Environment.UserName;
Microsoft.Build.Engine.UnitTests (383)
BackEnd\BuildManager_Tests.cs (1)
4109env.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)
1826env.SetCurrentDirectory(Environment.CurrentDirectory); 1836<I1 Include='f1' M1='{Environment.CurrentDirectory}\b\c' M2='6'/>
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1327message += Environment.NewLine + "This is an unhandled exception from a task -- PLEASE OPEN A BUG AGAINST THE TASK OWNER."; 1331message += Environment.NewLine + exception.ToString();
BackEnd\NodePackets_Tests.cs (3)
254string _initialTargetOutputLogging = Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"); 255Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "1"); 346Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", _initialTargetOutputLogging);
BackEnd\RedirectConsoleWriter_Tests.cs (1)
28sb.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)
70_logger.Errors[0].Message.ShouldBe(ResourceUtilities.FormatResourceStringIgnoreCodeAndKeyword("FailedToResolveSDK", "notfound", string.Join($"{Environment.NewLine} ", new[] {
BackEnd\TargetEntry_Tests.cs (6)
672string loggingVariable = Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"); 673Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", "1"); 756Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", loggingVariable); 768string loggingVariable = Environment.GetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING"); 769Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", null); 823Environment.SetEnvironmentVariable("MSBUILDTARGETOUTPUTLOGGING", loggingVariable);
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)
261$"Buffers starting at position {readCount} differ. First:{Environment.NewLine}{string.Join(",", bytes1)}{Environment.NewLine}Second:{Environment.NewLine}{string.Join(",", bytes2)}"); 478TransientTestFile testFile = testFolder.CreateFile(testFileName, string.Join(Environment.NewLine, new[] { "123", "456" }));
CommunicationUtilities_Tests.cs (3)
23IDictionary referenceVars = Environment.GetEnvironmentVariables(); 56Environment.GetEnvironmentVariable(testName1).ShouldBe(testValue); 57Environment.GetEnvironmentVariable(testName2).ShouldBe(null);
ConsoleLogger_Tests.cs (97)
129foreach (DictionaryEntry entry in Environment.GetEnvironmentVariables()) 632console.ToString().ShouldBe(message + Environment.NewLine); 693console.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>"); 697console.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>"); 704console.ToString().ShouldMatch($@"<{expectedColor}>{Regex.Escape(file)}\({lineNumber}\): {subcategory} {expectedMessageType} {code}: {message}{Environment.NewLine}<reset color>"); 822"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 823ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname") + Environment.NewLine + Environment.NewLine + 824"<reset color><red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + 825"<reset color><cyan>pf" + Environment.NewLine + 830sc.ToString().ShouldBe("<red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + "<reset color>"); 899"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 900ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname") + Environment.NewLine + Environment.NewLine + 901"<reset color><yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + 902"<reset color><cyan>pf" + Environment.NewLine + 907sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 1031"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1032ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname") + Environment.NewLine + Environment.NewLine + 1033"<reset color><red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + 1034"<reset color><cyan>pf" + Environment.NewLine + 1039sc.ToString().ShouldBe("<red>file.vb(42): VBC error 31415: Some long message" + Environment.NewLine + "<reset color>"); 1107"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1108ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname") + Environment.NewLine + Environment.NewLine + 1109"<reset color><yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + 1110"<reset color><cyan>pf" + Environment.NewLine + 1115sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 1183"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1184ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname") + Environment.NewLine + Environment.NewLine + 1185"<reset color><yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + 1186"<reset color><cyan>pf" + Environment.NewLine + 1191sc.ToString().ShouldBe("<yellow>file.vb(42): VBC warning 31415: Some long message" + Environment.NewLine + "<reset color>"); 1205ss.ShouldBe($"foo{Environment.NewLine}"); 1219ss.ShouldBe($" foo{Environment.NewLine} bar{Environment.NewLine} baz{Environment.NewLine} {Environment.NewLine}"); 1231ss.ShouldBe($"foo{Environment.NewLine}bar{Environment.NewLine}baz{Environment.NewLine}{Environment.NewLine}"); 1245ss.ShouldBe($"{Environment.NewLine}foo{Environment.NewLine}{Environment.NewLine}bar{Environment.NewLine}baz{Environment.NewLine}{Environment.NewLine}{Environment.NewLine}jazz{Environment.NewLine}razz{Environment.NewLine}{Environment.NewLine}matazz{Environment.NewLine}end{Environment.NewLine}"); 1278"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1279ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname1") + Environment.NewLine + 1280Environment.NewLine + "<reset color>" + 1281"<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1282ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForNestedProjectWithDefaultTargets", "fname1", "fname2") + Environment.NewLine + 1283Environment.NewLine + "<reset color>" + 1285Environment.NewLine + "<reset color>"); 1305sc.ToString().ShouldBe("<cyan>" + BaseConsoleLogger.projectSeparatorLine + Environment.NewLine + 1306ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForTopLevelProjectWithDefaultTargets", "fname1") + Environment.NewLine + 1307Environment.NewLine + "<reset color>"); 1321"<cyan>" + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TargetStartedPrefix", "tarname") + Environment.NewLine + "<reset color>" 1323+ Environment.NewLine + 1324" " + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectStartedPrefixForNestedProjectWithDefaultTargets", "fname1", "fname2") + Environment.NewLine + 1325Environment.NewLine + "<reset color>"); 1350sc.ToString().ShouldStartWith("<green>" + Environment.NewLine + "bf" + 1351Environment.NewLine + "<reset color>" + 1353Environment.NewLine + "<reset color>" + 1355Environment.NewLine + "<reset color>" + 1356Environment.NewLine); 1379sc.ToString().ShouldBe($"msg{Environment.NewLine}"); 1646message = message.Replace("\r\n", "\n").Replace("\n", Environment.NewLine); 1689item1spec = "spec" + Environment.NewLine; 1690item2spec = "spec2" + Environment.NewLine; 1691item3spec = "(spec;3" + Environment.NewLine; 1692item3metadatum = "f)oo = !@#" + Environment.NewLine; 1699item1spec = Environment.NewLine + " spec" + Environment.NewLine; 1700item2spec = Environment.NewLine + " spec2" + Environment.NewLine; 1701item3spec = Environment.NewLine + " (spec;3" + Environment.NewLine; 1704item1type = "type" + Environment.NewLine; 1705item2type = "type2" + Environment.NewLine; 1706item3type = "type(3)" + Environment.NewLine; 2437actualLog.ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectFinishedPrefixWithTargetNamesMultiProc", "None", "Build") + Environment.NewLine); 2440actualLog.ShouldContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectFinishedPrefixWithTargetNamesMultiProc", "None", "Build") + Environment.NewLine + Environment.NewLine); 2444actualLog.ShouldNotContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectFinishedPrefixWithTargetNamesMultiProc", "None", "Build") + Environment.NewLine + Environment.NewLine); 2448actualLog.ShouldNotContain(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("ProjectFinishedPrefixWithTargetNamesMultiProc", "None", "Build") + Environment.NewLine + 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); 270Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", "1"); 282Environment.SetEnvironmentVariable("MSBuildSolutionBatchTargets", null); 421Environment.SetEnvironmentVariable("VisualStudioVersion", null); 465Environment.SetEnvironmentVariable("VisualStudioVersion", null); 502Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 616string previousLegacyEnvironmentVariable = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 620Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 665Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", previousLegacyEnvironmentVariable); 1062Assert.True(buildResult, String.Join(Environment.NewLine, logger.Errors.Select(beea => beea.Message))); 1917string oldValueForMSBuildEmitSolution = Environment.GetEnvironmentVariable("MSBuildEmitSolution"); 1950Environment.SetEnvironmentVariable("MSBuildEmitSolution", "1"); 1965Environment.SetEnvironmentVariable("MSBuildEmitSolution", oldValueForMSBuildEmitSolution);
Definition\Project_Internal_Tests.cs (12)
32string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 39Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 62Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 76string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 83Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 102Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 122string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 130Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 145Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue); 173string oldValue = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 181Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 201Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldValue);
Definition\Toolset_Tests.cs (33)
192string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 196Environment.SetEnvironmentVariable("VisualStudioVersion", null); 214Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 226string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 230Environment.SetEnvironmentVariable("VisualStudioVersion", null); 250Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 257string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 261Environment.SetEnvironmentVariable("VisualStudioVersion", null); 275Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 282string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 286Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 297Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 304string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 308Environment.SetEnvironmentVariable("VisualStudioVersion", null); 322Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 329string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 333Environment.SetEnvironmentVariable("VisualStudioVersion", "foo"); 350Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 357string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 361Environment.SetEnvironmentVariable("VisualStudioVersion", null); 372Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 379string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 383Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 391Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 398string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 402Environment.SetEnvironmentVariable("VisualStudioVersion", null); 413Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 420string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 424Environment.SetEnvironmentVariable("VisualStudioVersion", null); 438Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 445string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 449Environment.SetEnvironmentVariable("VisualStudioVersion", ObjectModelHelpers.CurrentVisualStudioVersion); 466Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Definition\ToolsVersion_Tests.cs (42)
294string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 295string oldTreatHigherToolsVersions = Environment.GetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT"); 299Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", "1"); 300Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 324Environment.SetEnvironmentVariable("MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT", oldTreatHigherToolsVersions); 325Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 333string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 337Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 361Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 369string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 373Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 396Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 429string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 430string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 434Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 435Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 458Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 459Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 538string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 542Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 565Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 577string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 581Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 604Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 616string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 617string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 621Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 622Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 646Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 647Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 688string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 692Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 717Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion); 772string oldLegacyToolsVersion = Environment.GetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION"); 773string oldForceToolsVersionToCurrent = Environment.GetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT"); 777Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", "1"); 778Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", "1"); 802Environment.SetEnvironmentVariable("MSBUILDLEGACYDEFAULTTOOLSVERSION", oldLegacyToolsVersion); 803Environment.SetEnvironmentVariable("MSBUILDTREATALLTOOLSVERSIONSASCURRENT", oldForceToolsVersionToCurrent); 885string oldDefaultToolsVersion = Environment.GetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION"); 889Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", "foo"); 913Environment.SetEnvironmentVariable("MSBUILDDEFAULTTOOLSVERSION", oldDefaultToolsVersion);
Evaluation\Evaluator_Tests.cs (76)
549string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 552Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 567Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 591string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 596Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", null); 612Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 637string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 640Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 655Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 683string originalValue = Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY"); 686Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", "true"); 701Environment.SetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY", originalValue); 2425string backupMSBuildExtensionsPath = Environment.GetEnvironmentVariable(specialPropertyName); 2426string backupMSBuildExtensionsPath32 = Environment.GetEnvironmentVariable(specialPropertyName32); 2427string backupMagicSwitch = Environment.GetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH"); 2428string targetVar = Environment.GetEnvironmentVariable("Target"); 2429string numberVar = Environment.GetEnvironmentVariable("0env"); 2430string msbuildVar = Environment.GetEnvironmentVariable("msbuildtoolsversion"); 2436Environment.SetEnvironmentVariable(specialPropertyName, null); 2437Environment.SetEnvironmentVariable(specialPropertyName32, null); 2438Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", null); 2449Environment.SetEnvironmentVariable(specialPropertyName, backupMSBuildExtensionsPath); 2450Environment.SetEnvironmentVariable(specialPropertyName32, backupMSBuildExtensionsPath32); 2451Environment.SetEnvironmentVariable("MSBUILDLEGACYEXTENSIONSPATH", backupMagicSwitch); 2452Environment.SetEnvironmentVariable("Target", targetVar); 2453Environment.SetEnvironmentVariable("0env", numberVar); 2454Environment.SetEnvironmentVariable("msbuildtoolsversion", msbuildVar); 2466string backupMSBuildExtensionsPath = Environment.GetEnvironmentVariable("MSBuildExtensionsPath"); 2472Environment.SetEnvironmentVariable("MSBuildExtensionsPath", @"c:\foo\bar"); 2482Environment.SetEnvironmentVariable("MSBuildExtensionsPath", backupMSBuildExtensionsPath); 2546string originalMSBuildExtensionsPath32Value = Environment.GetEnvironmentVariable("MSBuildExtensionsPath32"); 2550Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", @"c:\devdiv\vscore\msbuild"); 2559Environment.SetEnvironmentVariable("MSBuildExtensionsPath32", originalMSBuildExtensionsPath32Value); 2621string originalMSBuildExtensionsPath64Value = Environment.GetEnvironmentVariable("MSBuildExtensionsPath64"); 2625Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", @"c:\devdiv\vscore\msbuild"); 2634Environment.SetEnvironmentVariable("MSBuildExtensionsPath64", originalMSBuildExtensionsPath64Value); 2660string expected = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 2663expected = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); 2678string originalLocalAppDataValue = Environment.GetEnvironmentVariable("LocalAppData"); 2682Environment.SetEnvironmentVariable("LocalAppData", @"c:\AppData\Local"); 2691Environment.SetEnvironmentVariable("LocalAppData", originalLocalAppDataValue); 3073string oldEnvironmentValue = Environment.GetEnvironmentVariable("EnvironmentProperty"); 3077Environment.SetEnvironmentVariable("EnvironmentProperty", "Bar;Baz"); 3113Environment.SetEnvironmentVariable("EnvironmentProperty", oldEnvironmentValue); 3829string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3832Environment.SetEnvironmentVariable("VisualStudioVersion", null); 3884Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3895string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3898Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCDE"); 3937Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3947string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 3950Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 3989Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 3999string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4002Environment.SetEnvironmentVariable("VisualStudioVersion", "abcdef"); 4041Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4051string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4052string originalC = Environment.GetEnvironmentVariable("C"); 4053string originalD = Environment.GetEnvironmentVariable("D"); 4057Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4058Environment.SetEnvironmentVariable("C", "c4"); // not explosive :) 4059Environment.SetEnvironmentVariable("D", "d4"); 4101Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4102Environment.SetEnvironmentVariable("C", originalC); 4103Environment.SetEnvironmentVariable("D", originalD); 4113string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4117Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4164Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4174string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4178Environment.SetEnvironmentVariable("VisualStudioVersion", "FakeSubToolset"); 4222Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 4323string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVerson"); 4329Environment.SetEnvironmentVariable("VisualStudioVersion", null); 4342Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
Evaluation\Expander_Tests.cs (14)
1869Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 2287string expected = ("OS=" + Environment.GetEnvironmentVariable("OS")).ToUpperInvariant(); 2620string env = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS"); 2624Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2634Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env); 2649string env = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS"); 2653Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", "1"); 2665Environment.SetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS", env); 2858Assert.Equal(System.Environment.GetFolderPath(Environment.SpecialFolder.System), result); 3823Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3847Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3871Assert.Equal(Environment.GetEnvironmentVariable(envVar), result); 3895Assert.Equal(Environment.GetEnvironmentVariable(envVar), result);
FileUtilities_Tests.cs (2)
813string directory = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "subfolder");
Instance\ProjectInstance_Internal_Tests.cs (12)
316string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 320Environment.SetEnvironmentVariable("VisualStudioVersion", null); 339Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 350string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 354Environment.SetEnvironmentVariable("VisualStudioVersion", "ABCD"); 365Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 375string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 379Environment.SetEnvironmentVariable("VisualStudioVersion", null); 393Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion); 404string originalVisualStudioVersion = Environment.GetEnvironmentVariable("VisualStudioVersion"); 408Environment.SetEnvironmentVariable("VisualStudioVersion", "ABC"); 434Environment.SetEnvironmentVariable("VisualStudioVersion", originalVisualStudioVersion);
ProjectCache\ProjectCacheTests.cs (3)
419MaxNodeCount = Environment.ProcessorCount 428MaxNodeCount = Environment.ProcessorCount 745MaxNodeCount = Environment.ProcessorCount,
WarningsAsMessagesAndErrors_Tests.cs (1)
262{(customProperties != null ? String.Join(Environment.NewLine, customProperties.Select(i => $"<{i.Key}>{i.Value}</{i.Key}>")) : "")}
Microsoft.Build.Framework (69)
ChangeWaves.cs (1)
128string msbuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION");
Constants.cs (1)
131internal 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");
FileClassifier.cs (2)
109string? programFiles = Environment.GetEnvironmentVariable(programFilesEnv); 121string? dir = Environment.GetEnvironmentVariable("VSAPPIDDIR");
InternalErrorException.cs (3)
115if (Environment.GetEnvironmentVariable("MSBUILDLAUNCHDEBUGGER") != null) 122if (!RunningTests() && Environment.GetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER") == null 123&& Environment.GetEnvironmentVariable("_NTROOT") == null)
NativeMethods.cs (3)
495int numberOfCpus = Environment.ProcessorCount; 1125Version osVersion = Environment.OSVersion.Version; 1629acceptAnsiColorCodes = AnsiDetector.IsAnsiSupported(Environment.GetEnvironmentVariable("TERM"));
OperatingSystem.cs (1)
42Version current = Environment.OSVersion.Version;
Traits.cs (55)
33DebugScheduler = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGSCHEDULER")); 34DebugNodeCommunication = DebugEngine || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGCOMM")); 39internal readonly string MSBuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION"); 44public readonly bool UseLazyWildCardEvaluation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes")); 45public readonly bool LogExpandedWildcards = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGEXPANDEDWILDCARDS")); 46public readonly bool ThrowOnDriveEnumeratingWildcard = Environment.GetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD") == "1"; 51public readonly bool CacheFileExistence = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileExistence")); 53public readonly bool UseSimpleProjectRootElementCacheConcurrency = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildUseSimpleProjectRootElementCacheConcurrency")); 58public readonly bool MSBuildCacheFileEnumerations = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileEnumerations")); 60public readonly bool EnableAllPropertyFunctions = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1"; 65public readonly bool EnableRestoreFirst = Environment.GetEnvironmentVariable("MSBUILDENABLERESTOREFIRST") == "1"; 70public static readonly string MSBuildNodeHandshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 75public readonly bool ForceEvaluateAsFullFramework = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildForceEvaluateAsFullFramework")); 88public readonly bool EmitSolutionMetaproj = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildEmitSolution")); 98public readonly bool SolutionBatchTargets = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildSolutionBatchTargets")); 103public readonly bool LogPropertyFunctionsRequiringReflection = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildLogPropertyFunctionsRequiringReflection")); 108public readonly bool LogAllAssemblyLoads = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLASSEMBLYLOADS")); 113public static bool LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")); 130public readonly bool DebugEngine = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugEngine")); 133public readonly bool DebugUnitTests = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugUnitTests")); 135public readonly bool InProcNodeDisabled = Environment.GetEnvironmentVariable("MSBUILDNOINPROCNODE") == "1"; 148return int.TryParse(Environment.GetEnvironmentVariable(environmentVariable), out int result) 159public readonly bool DoNotSendDeferredMessagesToBuildManager = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildDoNotSendDeferredMessagesToBuildManager")); 165public readonly bool DoNotExpandQualifiedMetadataInUpdateOperation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation")); 175public readonly bool AlwaysUseContentTimestamp = Environment.GetEnvironmentVariable("MSBUILDALWAYSCHECKCONTENTTIMESTAMP") == "1"; 181public readonly bool TruncateTaskInputs = Environment.GetEnvironmentVariable("MSBUILDTRUNCATETASKINPUTS") == "1"; 186public readonly bool DoNotTruncateConditions = Environment.GetEnvironmentVariable("MSBuildDoNotTruncateConditions") == "1"; 191public readonly bool AlwaysEvaluateDangerousGlobs = Environment.GetEnvironmentVariable("MSBuildAlwaysEvaluateDangerousGlobs") == "1"; 196public readonly bool AlwaysDoImmutableFilesUpToDateCheck = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEMODIFICATIONTIME") == "1"; 201public readonly bool CopyWithoutDelete = Environment.GetEnvironmentVariable("MSBUILDCOPYWITHOUTDELETE") == "1"; 218_logProjectImports = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGIMPORTS")); 235_logTaskInputs = Environment.GetEnvironmentVariable("MSBUILDLOGTASKINPUTS") == "1"; 254var variable = Environment.GetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION"); 274public readonly bool CacheAssemblyInformation = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHERARASSEMBLYINFORMATION") != "1"; 281public readonly bool UseSymlinkTimeInsteadOfTargetTime = Environment.GetEnvironmentVariable("MSBUILDUSESYMLINKTIMESTAMP") == "1"; 286public readonly bool ReuseTaskHostNodes = Environment.GetEnvironmentVariable("MSBUILDREUSETASKHOSTNODES") == "1"; 291public readonly bool IgnoreEmptyImports = Environment.GetEnvironmentVariable("MSBUILDIGNOREEMPTYIMPORTS") == "1"; 296public readonly bool IgnoreTreatAsLocalProperty = Environment.GetEnvironmentVariable("MSBUILDIGNORETREATASLOCALPROPERTY") != null; 301public readonly bool DebugEvaluation = Environment.GetEnvironmentVariable("MSBUILDDEBUGEVALUATION") != null; 306public readonly bool WarnOnUninitializedProperty = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY")); 314public readonly bool UseCaseSensitiveItemNames = Environment.GetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES") == "1"; 319public readonly bool DisableLongPaths = Environment.GetEnvironmentVariable("MSBUILDDISABLELONGPATHS") == "1"; 324public readonly bool DisableSdkResolutionCache = Environment.GetEnvironmentVariable("MSBUILDDISABLESDKCACHE") == "1"; 329public readonly bool TargetPathForRelatedFiles = Environment.GetEnvironmentVariable("MSBUILDTARGETPATHFORRELATEDFILES") == "1"; 334public readonly bool UseSingleLoadContext = Environment.GetEnvironmentVariable("MSBUILDSINGLELOADCONTEXT") == "1"; 339public readonly bool UseAutoRunWhenLaunchingProcessUnderCmd = Environment.GetEnvironmentVariable("MSBUILDUSERAUTORUNINCMD") == "1"; 344public readonly bool AvoidUnicodeWhenWritingToolTaskBatch = Environment.GetEnvironmentVariable("MSBUILDAVOIDUNICODE") == "1"; 349public readonly bool EnsureStdOutForChildNodesIsPrimaryStdout = Environment.GetEnvironmentVariable("MSBUILDENSURESTDOUTFORTASKPROCESSES") == "1"; 357public readonly bool UseMinimalResxParsingInCoreScenarios = Environment.GetEnvironmentVariable("MSBUILDUSEMINIMALRESX") == "1"; 365public readonly bool DoNotVersionBuildResult = Environment.GetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT") == "1"; 370public readonly bool DoNotLimitBuildCheckResultsNumber = Environment.GetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER") == "1"; 402var value = Environment.GetEnvironmentVariable("MSBUILDCUSTOMBUILDEVENTWARNING"); 429var value = Environment.GetEnvironmentVariable(environmentVariable); 448var mode = Environment.GetEnvironmentVariable("MSBUILD_PROJECTINSTANCE_TRANSLATION_MODE"); 472var mode = Environment.GetEnvironmentVariable("MSBUILD_SDKREFERENCE_PROPERTY_EXPANSION_MODE");
Microsoft.Build.Framework.UnitTests (12)
AssemblyLoadBuildEventArgs_Tests.cs (2)
32int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildCanceledEventArgs_Tests.cs (2)
34int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildCheckTracingEventArgs_Tests.cs (2)
48int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
BuildSubmissionStartedEventArgs_Tests.cs (2)
56int 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)
31int packetVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
Microsoft.Build.Tasks.CodeAnalysis (10)
ManagedCompiler.cs (1)
637string? libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (3)
119loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 152var threadId = Environment.CurrentManagedThreadId; 154string output = prefix + message + Environment.NewLine;
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Shared\BuildServerConnection.cs (3)
207var originalThreadId = Environment.CurrentManagedThreadId; 268var releaseThreadId = Environment.CurrentManagedThreadId; 553var userName = Environment.UserName;
Vbc.cs (1)
239private static readonly string[] s_separator = { Environment.NewLine };
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 (84)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigCache.cs (1)
42if (Environment.GetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE") != null)
AssemblyDependency\AssemblyFoldersFromConfig\AssemblyFoldersFromConfigResolver.cs (1)
118bool useCache = Environment.GetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE") == null;
AssemblyDependency\ResolveAssemblyReference.cs (2)
2187_logVerboseSearchResults = Environment.GetEnvironmentVariable("MSBUILDLOGVERBOSERARSEARCHRESULTS") != null; 2890string dumpFrameworkSubsetList = Environment.GetEnvironmentVariable("MSBUILDDUMPFRAMEWORKSUBSETLIST");
BootstrapperUtil\BootstrapperBuilder.cs (5)
35private static readonly bool s_logging = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("VSPLOG")); 520productsOrder.Append(p.ProductCode).Append(Environment.NewLine); 1975return str.Replace("%NEWLINE%", Environment.NewLine); 2200Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
Copy.cs (4)
89private static bool s_alwaysRetryCopy = Environment.GetEnvironmentVariable(AlwaysRetryEnvVar) != null; 94private static readonly bool s_forceSymlinks = Environment.GetEnvironmentVariable("MSBuildUseSymboliclinksIfPossible") != null; 209s_alwaysRetryCopy = Environment.GetEnvironmentVariable(AlwaysRetryEnvVar) != null; 419if (Environment.GetEnvironmentVariable(AlwaysOverwriteReadOnlyFilesEnvVar) != null)
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 68return ScanNodeMode(Environment.CommandLine); 93var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
EnvironmentUtilities.cs (1)
14Environment.Is64BitOperatingSystem;
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
Exec.cs (1)
506return Environment.GetEnvironmentVariable("ComSpec");
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
GenerateApplicationManifest.cs (4)
225int t1 = Environment.TickCount; 244Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateApplicationManifest.AddIsolatedComReferences t={0}", Environment.TickCount - t1)); 270int t1 = Environment.TickCount; 329Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateApplicationManifest.AddClickOnceFiles t={0}", Environment.TickCount - t1));
GenerateManifestBase.cs (6)
425_startTime = Environment.TickCount; 512int t1 = Environment.TickCount; 522Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifestBase.ResolveFiles t={0}", Environment.TickCount - t1)); 615int t1 = Environment.TickCount; 628Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifestBase.WriteManifest t={0}", Environment.TickCount - t1)); 629Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "Total time to generate manifest '{1}': t={0}", Environment.TickCount - _startTime, Path.GetFileName(OutputManifest.ItemSpec)));
ManifestUtil\ApplicationManifest.cs (4)
432int t1 = Environment.TickCount; 511Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifest.CheckForComDuplicates t={0}", Environment.TickCount - t1)); 641int t1 = Environment.TickCount; 721Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "GenerateManifest.CheckManifestReferences t={0}", Environment.TickCount - t1));
ManifestUtil\ComImporter.cs (1)
188if (Environment.Is64BitProcess)
ManifestUtil\EmbeddedManifestReader.cs (2)
75int t1 = Environment.TickCount; 77Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "EmbeddedManifestReader.Read t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestFormatter.cs (2)
18int t1 = Environment.TickCount; 100Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.Format t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestReader.cs (4)
181int t1 = Environment.TickCount; 223Util.WriteLog(String.Format(CultureInfo.InvariantCulture, "ManifestReader.ReadManifest t={0}", Environment.TickCount - t1)); 244int t1 = Environment.TickCount; 249Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestReader.Deserialize t={0}", Environment.TickCount - t1));
ManifestUtil\ManifestWriter.cs (4)
29int t1 = Environment.TickCount; 31Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.Serialize t={0}", Environment.TickCount - t1)); 95int t1 = Environment.TickCount; 191Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.WriteManifest t={0}", Environment.TickCount - t1));
ManifestUtil\PathUtil.cs (1)
225return i >= 0 ? path.Substring(0, i) + Environment.MachineName.ToLowerInvariant() + path.Substring(i + localHost.Length) : path;
ManifestUtil\SecurityUtil.cs (3)
722Environment.GetFolderPath(Environment.SpecialFolder.Windows), 724Environment.Is64BitProcess ? "Framework64" : "Framework",
ManifestUtil\TrustInfo.cs (2)
703int t1 = Environment.TickCount; 793Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "ManifestWriter.WriteTrustInfo t={0}", 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")); 139Version v = Environment.Version; 284string logPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"Microsoft\VisualStudio\8.0\VSPLOG");
ManifestUtil\XmlUtil.cs (10)
79int t1 = Environment.TickCount; 83int t2 = Environment.TickCount; 85Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "new XPathDocument(1) t={0}", Environment.TickCount - t2)); 87int t3 = Environment.TickCount; 92Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform.Load t={0}", Environment.TickCount - t3)); 99int t4 = Environment.TickCount; 102Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "new XmlReader(2) t={0}", Environment.TickCount - t4)); 123int t5 = Environment.TickCount; 125Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform.Transform t={0}", Environment.TickCount - t4)); 131Util.WriteLog(String.Format(CultureInfo.CurrentCulture, "XslCompiledTransform(\"{0}\") t={1}", resource, Environment.TickCount - t1));
Modifiers.cs (1)
31private static readonly bool s_traceModifierCasing = (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTRACEMODIFIERCASING")));
RoslynCodeTaskFactory\RoslynCodeTaskFactory.cs (3)
684bool deleteSourceCodeFile = Environment.GetEnvironmentVariable("MSBUILDLOGCODETASKFACTORYOUTPUT") == null; 707string toolExe = Environment.GetEnvironmentVariable("CscToolExe"); 723string toolExe = Environment.GetEnvironmentVariable("VbcToolExe");
RoslynCodeTaskFactory\RoslynCodeTaskFactoryCompilers.cs (1)
51_dotnetCliPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
TempFileUtilities.cs (1)
44msbuildTempFolderPrefix + Environment.UserName;
Tracing.cs (2)
60string val = Environment.GetEnvironmentVariable("MSBUILDTRACEINTERVAL"); 121Trace.WriteLine(System.Environment.StackTrace);
Microsoft.Build.Tasks.UnitTests (94)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (2)
180Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", "1"); 187Environment.SetEnvironmentVariable("MSBUILDDISABLEASSEMBLYFOLDERSEXCACHE", null);
Copy_Tests.cs (12)
110_alwaysOverwriteReadOnlyFiles = Environment.GetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar); 111_alwaysRetry = Environment.GetEnvironmentVariable(Copy.AlwaysRetryEnvVar); 113Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, null); 114Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, null); 124Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, _alwaysOverwriteReadOnlyFiles); 125Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, _alwaysRetry); 761string oldAlwaysOverwriteValue = Environment.GetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar); 765Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, "1 "); 809Environment.SetEnvironmentVariable(Copy.AlwaysOverwriteReadOnlyFilesEnvVar, oldAlwaysOverwriteValue); 827string oldAlwaysRetryValue = Environment.GetEnvironmentVariable(Copy.AlwaysRetryEnvVar); 831Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, "1 "); 878Environment.SetEnvironmentVariable(Copy.AlwaysRetryEnvVar, oldAlwaysRetryValue);
Exec_Tests.cs (22)
271Environment.GetFolderPath(Environment.SpecialFolder.Windows); // not desktop etc - IT redirection messes it up 283string working = @"\\" + Environment.MachineName + @"\c$"; 291string system = Environment.GetFolderPath(Environment.SpecialFolder.System); 303Environment.GetFolderPath(Environment.SpecialFolder.Windows) : "/usr/lib"); 326string oldTmp = Environment.GetEnvironmentVariable("TMP"); 339Environment.SetEnvironmentVariable("TMP", newTmp); 347Environment.SetEnvironmentVariable("TMP", oldTmp); 363string oldTmp = Environment.GetEnvironmentVariable("TMP"); 376Environment.SetEnvironmentVariable("TMP", newTmp); 385Environment.SetEnvironmentVariable("TMP", oldTmp); 401string oldTmp = Environment.GetEnvironmentVariable("TMP"); 414Environment.SetEnvironmentVariable("TMP", newTmp); 422Environment.SetEnvironmentVariable("TMP", oldTmp); 438string oldTmp = Environment.GetEnvironmentVariable("TMP"); 451Environment.SetEnvironmentVariable("TMP", newTmp); 459Environment.SetEnvironmentVariable("TMP", oldTmp); 852string oldValue = Environment.GetEnvironmentVariable("errorlevel"); 857Environment.SetEnvironmentVariable("errorlevel", "1"); 864Environment.SetEnvironmentVariable("errorlevel", oldValue);
FormatUrl_Tests.cs (4)
78t.OutputUrl.ShouldBe(new Uri(Path.Combine(Environment.CurrentDirectory, t.InputUrl)).AbsoluteUri); 118t.InputUrl = Environment.CurrentDirectory; 135t.OutputUrl.ShouldBe(new Uri(Environment.CurrentDirectory).AbsoluteUri); 177t.OutputUrl.ShouldBe(@"https://" + Environment.MachineName.ToLowerInvariant() + "/Example/Path");
GetInstalledSDKLocations_Tests.cs (10)
274Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 275Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 308Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 309Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 321Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", _fakeSDKStructureRoot + ";" + _fakeSDKStructureRoot2); 322Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 382Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 383Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 395Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 456Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
HintPathResolver_Tests.cs (2)
55bool result = ResolveHintPath(Environment.NewLine + tempFile.Path + Environment.NewLine);
RegressionTests.cs (1)
81Assert.True(result, "Output:" + Environment.NewLine + logger.FullLog);
ResolveSDKReference_Tests.cs (20)
3766Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3767Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3835Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3836Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 3907Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 3908Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 3978Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 3979Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4029Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4030Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4087Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4088Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4134Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4135Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4186Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4187Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null); 4273Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", testDirectoryRoot); 4274Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", "true"); 4318Environment.SetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY", null); 4319Environment.SetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP", null);
RoslynCodeTaskFactory_Tests.cs (1)
757var dotnetPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH");
WriteCodeFragment_Tests.cs (4)
551var multilineString = String.Join(Environment.NewLine, lines); 587var multilineString = String.Join(Environment.NewLine, lines); 1174string expectedContent = string.Join(Environment.NewLine, expectedHeader.Concat(expectedAttributes)); 1178Environment.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)
164string message = $"Received telemetry event '{eventName}'{Environment.NewLine}"; 167message += $" Property '{key}' = '{properties[key]}'{Environment.NewLine}";
RequiresSymbolicLinksFactAttribute.cs (1)
18bool.TryParse(Environment.GetEnvironmentVariable("TF_BUILD"), out bool value) && value;
RunnerUtilities.cs (1)
80var comSpec = Environment.GetEnvironmentVariable("ComSpec");
TestEnvironment.cs (19)
157() => Environment.GetEnvironmentVariable(environmentVariableName))); 431_initialEnvironment = Environment.GetEnvironmentVariables(); 436var environment = Environment.GetEnvironmentVariables(); 578Environment.SetEnvironmentVariable(key, tempPath); 590Environment.SetEnvironmentVariable(key, tempPaths[key]); 600[TMP] = Environment.GetEnvironmentVariable(TMP), 601[TEMP] = Environment.GetEnvironmentVariable(TEMP) 606tempPaths[TMPDIR] = Environment.GetEnvironmentVariable(TMPDIR); 655_previousDebugEngineEnv = Environment.GetEnvironmentVariable("MSBuildDebugEngine"); 656_previousDebugPath = Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 660Environment.SetEnvironmentVariable("MSBuildDebugEngine", "1"); 661Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", FileUtilities.TempFileDirectory); 665Environment.SetEnvironmentVariable("MSBuildDebugEngine", null); 666Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", null); 672Environment.SetEnvironmentVariable("MSBuildDebugEngine", _previousDebugEngineEnv); 673Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", _previousDebugPath); 772_originalValue = Environment.GetEnvironmentVariable(environmentVariableName); 774Environment.SetEnvironmentVariable(environmentVariableName, newValue); 779Environment.SetEnvironmentVariable(_environmentVariableName, _originalValue);
Microsoft.Build.Utilities.Core (42)
AssemblyFolders\AssemblyFoldersFromConfigInfo.cs (1)
37DirectoryPath = Environment.ExpandEnvironmentVariables(directoryPath);
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommandLineBuilder.cs (1)
220CommandLine.Append(Environment.NewLine);
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 68return ScanNodeMode(Environment.CommandLine); 93var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
EnvironmentUtilities.cs (1)
14Environment.Is64BitOperatingSystem;
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
FrameworkLocationHelper.cs (8)
137internal static readonly string programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); 787string complusInstallRoot = Environment.GetEnvironmentVariable("COMPLUS_INSTALLROOT"); 788string complusVersion = Environment.GetEnvironmentVariable("COMPLUS_VERSION"); 878string programFilesX86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86); 900programFilesX64 = Environment.GetEnvironmentVariable("ProgramW6432"); 918string combinedPath = Environment.GetEnvironmentVariable("ReferenceAssemblyRoot");
Modifiers.cs (1)
31private static readonly bool s_traceModifierCasing = (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTRACEMODIFIERCASING")));
TaskLoggingHelper.cs (3)
944if (!showDetail && (Environment.GetEnvironmentVariable("MSBUILDDIAGNOSTICS") == null)) // This env var is also used in ToolTask 950message += Environment.NewLine + exception.StackTrace; 1287message += Environment.NewLine + exception.StackTrace;
TempFileUtilities.cs (1)
44msbuildTempFolderPrefix + Environment.UserName;
ToolLocationHelper.cs (7)
1621return Environment.GetFolderPath(Environment.SpecialFolder.System); 2894string userLocalAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); 2942string sdkDirectoryRootsFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDSDKREFERENCEDIRECTORY"); 2969string sdkDirectoryRootsFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDMULTIPLATFORMSDKREFERENCEDIRECTORY"); 2989string disableRegistryForSDKLookup = Environment.GetEnvironmentVariable("MSBUILDDISABLEREGISTRYFORSDKLOOKUP");
ToolTask.cs (4)
63private static readonly bool s_preserveTempFiles = string.Equals(Environment.GetEnvironmentVariable("MSBUILDPRESERVETOOLTEMPFILES"), "1", StringComparison.Ordinal); 1004string timeoutFromEnvironment = Environment.GetEnvironmentVariable("MSBUILDTOOLTASKCANCELPROCESSWAITTIMEOUT"); 1317return Environment.GetEnvironmentVariable("PATH")? 1447$@"%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 (38)
MuxLogger_Tests.cs (2)
131mockLogger.FullLog.Replace(Environment.NewLine, "").ShouldBe(mockLogger2.FullLog.Replace(Environment.NewLine, ""));
ToolLocationHelper_Tests.cs (22)
658if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("ProgramFiles(x86)"))) 1954Environment.SpecialFolder folder = Environment.Is64BitOperatingSystem ? Environment.SpecialFolder.ProgramFilesX86 : Environment.SpecialFolder.ProgramFiles; 1955string programFilesX86 = Environment.GetFolderPath(folder); 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 (22)
Collections\CachingFactory.cs (1)
200Environment.ProcessorCount * 2);
DiagnosticAnalyzer\AnalyzerDriver.cs (1)
334private readonly int _workerCount = Environment.ProcessorCount;
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
1195Environment.FailFast(CreateAnalyzerExceptionDiagnostic(analyzer, ex, info).ToString()); 1249var contextInformation = string.Join(Environment.NewLine, CreateDiagnosticDescription(info, e), CreateDisablingMessage(analyzer, analyzerName)).Trim(); 1262return string.Join(Environment.NewLine,
DiaSymReader\SymUnmanagedFactory.cs (1)
83foreach (var method in typeof(Environment).GetTypeInfo().GetDeclaredMethods("GetEnvironmentVariable"))
InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
InternalUtilities\StringTable.cs (3)
71private int _localRandom = Environment.TickCount; 74private static int s_sharedRandom = Environment.TickCount; 94var 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\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
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)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
71private int _localRandom = Environment.TickCount; 74private static int s_sharedRandom = Environment.TickCount; 94var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
48_ => 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)
284: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
46/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 192return _owningThreadId == Environment.CurrentManagedThreadId; 203_owningThreadId = Environment.CurrentManagedThreadId;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\RoslynParallel.NetFramework.cs (5)
39/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 57/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 217/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 235/// <remarks>The operation will execute at most <see cref="Environment.ProcessorCount"/> operations in parallel.</remarks> 377private static int DefaultDegreeOfParallelism => Environment.ProcessorCount;
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.CSharp (1)
Binder\Binder.cs (1)
943var lines = scope.ScopeDesignator.ToString().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
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)
23"class X[| |]" + Environment.NewLine + 24"{" + Environment.NewLine + 25"}" + Environment.NewLine; 27"class X" + Environment.NewLine + 28"{" + Environment.NewLine + 29"}" + 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); 9006Assert.Contains($"error CS0016: Could not write to output file '{exePath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9029Assert.Contains($"error CS0016: Could not write to output file '{pdbPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9051Assert.Equal($"error CS0016: Could not write to output file '{xmlPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 9081Assert.Equal($"error CS0016: Could not write to output file '{sourceLinkPath}' -- 'Fake IOException'{Environment.NewLine}", outWriter.ToString()); 10597expectedExitCode, 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)
1313buffer.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)
935var data = (n$$) {{(hasNewline ? Environment.NewLine : string.Empty)}} M();
Completion\CompletionProviders\CompletionProviderOrderTests.cs (2)
79string.Join(Environment.NewLine, expectedOrder.Select(x => x.FullName)), 80string.Join(Environment.NewLine, actualOrder.Select(x => x.FullName)));
Completion\CompletionProviders\KeywordCompletionProviderTests.cs (1)
599var data = (n$$) {(hasNewline ? Environment.NewLine : string.Empty)} M();
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
87var 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)
96{string.Join(Environment.NewLine, body.ReplaceLineEndings("\n").Split('\n').Select(line => line == "" ? line : $" {line}"))}
Formatting\FormattingEngineTests.cs (1)
1845var endOfFile = trailingNewLine ? Environment.NewLine : "";
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (15)
CodeGen\CodeGenAsyncLocalsTests.cs (3)
35var actualLines = c.VisualizeIL(qualifiedMethodName).Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 37return string.Join(Environment.NewLine, 40select pair.line1.Trim() + Environment.NewLine + pair.line2.Trim());
CodeGen\CodeGenAsyncSpillTests.cs (1)
3400var expected = 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); 6319var 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)
3638Assert.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)
188verify: s_verification with { ILVerifyMessage = ilVerifyMessage + Environment.NewLine + s_verification.ILVerifyMessage }, 211$"Method '{qualifiedMethodName}' should {(expected ? "be" : "not be")} instrumented. Actual IL:{Environment.NewLine}{il}"); 367ILVerifyMessage = s_verification.ILVerifyMessage + Environment.NewLine + """
Emit\RuntimeProbing\ModuleCancellationTests.cs (1)
46$"Method '{qualifiedMethodName}' should not be instrumented with '{instrumentationIndicator}'. Actual IL:{Environment.NewLine}{il}");
Emit\RuntimeProbing\StackOverflowProbingTests.cs (1)
39$"Method '{qualifiedMethodName}' should not be instrumented. Actual IL:{Environment.NewLine}{il}");
PDB\PDBTests.cs (1)
435.Join(Environment.NewLine);
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (3)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
1406if (Environment.ProcessorCount <= 1)
RefReadonlyParameterTests.cs (2)
7826CreateCompilation(source2 + Environment.NewLine + source3, new[] { comp1Ref }, parseOptions: TestOptions.Regular11).VerifyDiagnostics( 8648CreateCompilation(source2 + Environment.NewLine + source3, new[] { comp1Ref }, parseOptions: TestOptions.Regular11).VerifyDiagnostics(
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)
192description: (snippet.Title + Environment.NewLine + snippet.Description).ToSymbolDisplayParts(),
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (1)
593[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 (16)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (3)
66$"{Environment.NewLine}Expected span: '{expectedText}' {expected}" + 67$"{Environment.NewLine}Actual span: '{actualText}' {actual}"); 769.Select(d => $"{d.Id}: {d.GetMessage().Split(new[] { Environment.NewLine }, StringSplitOptions.None).First()}"));
SemanticSearch\CSharpSemanticSearchServiceTests.cs (7)
184" ..." + Environment.NewLine + 185string.Join(Environment.NewLine, Enumerable.Repeat($" at Program.<<Main>$>g__F|0_1(Int64 x) in {FeaturesResources.Query}:line 7", 31)) + Environment.NewLine + 186$" at Program.<<Main>$>g__Find|0_0(Compilation compilation)+MoveNext() in Query:line 4" + Environment.NewLine, 241$" at Program.<<Main>$>g__F|0_1(ISymbol s) in {FeaturesResources.Query}:line 11" + Environment.NewLine + 242$" at Program.<>c.<<Main>$>b__0_2(ISymbol x) in {FeaturesResources.Query}:line 5" + Environment.NewLine + 243$" at System.Linq.Enumerable.ArraySelectIterator`2.MoveNext()" + Environment.NewLine,
src\Analyzers\CSharp\Tests\Formatting\FormattingAnalyzerTests.cs (6)
23"class X[| |]" + Environment.NewLine + 24"{" + Environment.NewLine + 25"}" + Environment.NewLine; 27"class X" + Environment.NewLine + 28"{" + Environment.NewLine + 29"}" + Environment.NewLine;
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
InteractiveSessionReferencesTests.cs (1)
109Assert.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 (23)
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) 11150CompileAndVerify(source: source, expectedOutput: "abcdef" + Environment.NewLine + "abcdef" + Environment.NewLine + "abcdef"); 11201CompileAndVerify(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 (5)
1256source = source.Replace(Environment.NewLine, "\r\n"); 1347source = source.Replace(Environment.NewLine, "\r\n"); 2123spc.AddSource("InvokedMethods.g.cs", string.Join(Environment.NewLine, 4119$"{message}{Environment.NewLine}Parameter name: {parameterName}"; 4140var 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)
3756$" ///<summary>{Environment.NewLine}" + 3757$" /// A documentation comment{Environment.NewLine}" + 3758$" ///</summary>{Environment.NewLine}" + 3784$" /// <summary>{Environment.NewLine}" + 3785$" /// A documentation comment{Environment.NewLine}" + 3786$" /// </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 DefaultAnalyzerAssemblyLoader(), 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)
9157var lines = s.Split(new[] { Environment.NewLine }, StringSplitOptions.None); 9166return string.Join(Environment.NewLine, lines);
Formatting\FormattingTriviaTests.cs (1)
1784var newLine = Environment.NewLine;
OrganizeImports\OrganizeUsingsTests.cs (2)
31var document = project.AddDocument("Document", initial.ReplaceLineEndings(endOfLine ?? Environment.NewLine)); 43Assert.Equal(final.ReplaceLineEndings(endOfLine ?? Environment.NewLine), newRoot.ToFullString());
Microsoft.CodeAnalysis.EditorFeatures (10)
ExtractMethod\ExtractMethodCommandHandler.cs (6)
231EditorFeaturesResources.Extract_method_encountered_the_following_issues + Environment.NewLine + 232string.Join("", result.Reasons.Select(r => Environment.NewLine + " " + r)), 245EditorFeaturesResources.Extract_method_encountered_the_following_issues + Environment.NewLine + 246string.Join("", result.Reasons.Select(r => Environment.NewLine + " " + r)) + Environment.NewLine + Environment.NewLine +
Preview\AbstractPreviewFactoryService.cs (1)
462: string.Join(Environment.NewLine, conflictDescriptions.Concat(warningDescriptions));
Shared\Utilities\ResettableDelay.cs (2)
54_lastSetTime = Environment.TickCount; 70while (Environment.TickCount - _lastSetTime < _delayInMilliseconds);
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ReferenceCounting.cs (1)
21if (!Environment.HasShutdownStarted)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (7)
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (2)
77Type(session, Environment.NewLine); 100Type(session, Environment.NewLine);
LanguageServer\TestOutputLspLogger.cs (1)
26=> Log("Warning", $"{message}{Environment.NewLine}{exception}", @params);
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (2)
44string.Join(Environment.NewLine, expectedSpans), 45string.Join(Environment.NewLine, actualSpans));
QuickInfo\AbstractQuickInfoSourceTests.cs (1)
25return 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)
629=> exception.Message + Environment.NewLine + exception.StackTrace; 1066code = Environment.NewLine + code;
Diagnostics\IDEDiagnosticIDConfigurationTests.cs (5)
97expectedLines = expected.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); 733Environment.NewLine + 734string.Join(Environment.NewLine, baseline.Select(Inspect))); 747Environment.NewLine + 748string.Join(Environment.NewLine, extraEntitiesBuilder.Select(Inspect)));
Structure\AbstractStructureTaggerProviderTests.cs (1)
19var buffer = EditorFactory.CreateBuffer(exportProvider, input.Split(new string[] { Environment.NewLine }, StringSplitOptions.None));
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Preview\DifferenceViewerPreview.cs (1)
85if (Environment.HasShutdownStarted)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
DkmUtilities.cs (1)
351$"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)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: 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)
96var intPtr = Environment.Is64BitProcess ? new IntPtr((long)RawValue) : new IntPtr((int)RawValue); 552if (Environment.Is64BitProcess) 769? (Environment.Is64BitProcess ? typeof(long) : typeof(int))
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
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 (13)
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(),
EditAndContinue\EditAndContinueService.cs (1)
83var path = Environment.GetEnvironmentVariable("Microsoft_CodeAnalysis_EditAndContinue_LogDir");
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingLowPriorityProcessor.cs (1)
103Logger.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)
302var documentTooltip = navigateDocument.FilePath + Environment.NewLine + dllPath;
SemanticSearch\AbstractSemanticSearchService.cs (1)
301new TaggedText(tag: TextTags.Text, (skippedFrameCount > 0 ? " ..." + Environment.NewLine : "") + GetStackTraceText(displayFrames))
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 (6)
EditAndContinue\ActiveStatementTestHelpers.cs (1)
88src = src[..start] + string.Join("", Enumerable.Repeat(Environment.NewLine, lineCount)) + src[end..];
EditAndContinue\EditAndContinueTestVerifier.cs (1)
397throw 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\RudeEditDiagnosticDescription.cs (2)
57? $"\"\"\"{Environment.NewLine}{_squiggle}{Environment.NewLine}\"\"\""
Microsoft.CodeAnalysis.Features.UnitTests (2)
FindUsages\DefinitionItemFactoryTests.cs (2)
73itemSeparator: "," + Environment.NewLine, 123=> propertyName == null ? null : $"{Environment.NewLine}{nameof(DefinitionItem)}.{propertyName} does not match expected value.";
Microsoft.CodeAnalysis.InteractiveHost (15)
Interactive\Core\InteractiveHost.Service.cs (6)
110FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.Windows)), 111FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)), 112FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)),
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
46/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 192return _owningThreadId == Environment.CurrentManagedThreadId; 203_owningThreadId = Environment.CurrentManagedThreadId;
Microsoft.CodeAnalysis.LanguageServer (17)
DotnetCliHelper.cs (1)
132var path = Environment.GetEnvironmentVariable("PATH") ?? "";
ExportProviderBuilder.cs (4)
98logger.LogTrace($"Composing MEF catalog using:{Environment.NewLine}{string.Join($" {Environment.NewLine}", assemblyPaths)}."); 128var cacheSubdirectory = $".NET {Environment.Version.Major}"; 204logger.LogError($"Encountered errors in the MEF composition:{Environment.NewLine}{ex.ErrorsAsString}");
HostWorkspace\ProjectDependencyHelper.cs (2)
99+ Environment.NewLine 100+ string.Join(Environment.NewLine, unresolved.Select(r => $" {r.Name}-{r.VersionRange}"));
LanguageServer\Handler\Restore\RestoreHandler.cs (1)
44progress.Report(new RestorePartialResult(LanguageServerResources.Restore, $"{LanguageServerResources.Restore_complete}{Environment.NewLine}"));
Program.cs (1)
64logger.Log(serverConfiguration.LaunchDebugger ? LogLevel.Critical : LogLevel.Trace, "Server started with process ID {processId}", Environment.ProcessId);
Testing\RunTestsHandler.cs (1)
181_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)
76message = @$"==== {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}"; 193return text.Replace(Environment.NewLine, $"{Environment.NewLine}{indentation}").TrimEnd().Insert(0, indentation);
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Extensions\ProtocolConversions.cs (1)
938var content = markdownBuilder.Build(Environment.NewLine);
Features\DecompiledSource\AssemblyResolver.cs (1)
170=> _logger.AppendFormat(format + Environment.NewLine, args);
Features\DecompiledSource\CSharpCodeDecompilerDecompilationService.cs (2)
73text += "#if false // " + FeaturesResources.Decompilation_log + Environment.NewLine; 75text += "#endif" + Environment.NewLine;
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.cs (1)
90=> $"project: ({project.Id}), ({string.Join(Environment.NewLine, stateSets.Select(s => s.Analyzer.ToString()))})";
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)
119throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 124throw 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 (2)
SpellCheck\SpellCheckTests.cs (2)
75var markup = string.Join(Environment.NewLine, Enumerable.Range(0, 5500).Select(v => 80{{string.Join(Environment.NewLine, Enumerable.Repeat("", random.Next() % 5))}}
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
TelemetryReporterTests.cs (1)
25Environment.SetEnvironmentVariable("CommonPropertyBagPath", Path.GetTempFileName());
Microsoft.CodeAnalysis.PooledObjects.Package (1)
ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Host\ThrowingTraceListener.cs (1)
16(string.IsNullOrEmpty(detailMessage) ? "" : Environment.NewLine + detailMessage));
Services\BrokeredServiceBase.cs (1)
213Environment.SetEnvironmentVariable("MICROSOFT_DIASYMREADER_NATIVE_ALT_LOAD_PATH", loadDir);
Microsoft.CodeAnalysis.Scripting (2)
Hosting\ObjectFormatter\CommonObjectFormatter.cs (2)
44newLine: Environment.NewLine, 75builder.Append(Environment.NewLine);
Microsoft.CodeAnalysis.Scripting.Desktop.UnitTests (6)
MetadataShadowCopyProviderTests.cs (6)
32FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.Windows)), 33FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)), 34FileUtilities.NormalizeDirectoryPath(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)),
Microsoft.CodeAnalysis.Scripting.TestUtilities (5)
ObjectFormatterTestBase.cs (3)
22foreach (var line in str.Split(new[] { Environment.NewLine + " " }, StringSplitOptions.None)) 30Assert.Equal(expected[i] + Environment.NewLine + "}" + Environment.NewLine, line);
TestCSharpObjectFormatter.cs (1)
31newLine: Environment.NewLine,
TestVisualBasicObjectFormatter.cs (1)
32newLine: Environment.NewLine,
Microsoft.CodeAnalysis.Test.Utilities (76)
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)
501=> source.Replace(Environment.NewLine, "\r\n");
Compilation\CompilationDifference.cs (1)
98Assert.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")); 242actualTextBuilder.Append(Environment.NewLine); 247actualTextBuilder.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(); 204LogString(Environment.NewLine);
CompilationVerifier.cs (6)
119throw new Exception($"Didn't find method '{methodName}'. Available/distinguishable methods are: {Environment.NewLine}{string.Join(Environment.NewLine, map.Keys)}"); 284Environment.FailFast("Investigating flaky IL verification issue. Tracked by https://github.com/dotnet/roslyn/issues/63782"); 378$"IL Verify failed unexpectedly:{Environment.NewLine}{actualMessage}" : 420return string.Join(Environment.NewLine, result.Select(r => printMethod(r.Method, metadataReader) + r.Message + printErrorArguments(r.ErrorArguments))); 633throw 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)
572assertText.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.UnitTests (23)
Analyzers\AnalyzerConfigTests.cs (3)
204var config = ParseConfigFile(string.Join(Environment.NewLine, 352var config = ParseConfigFile(string.Join(Environment.NewLine, 363var 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.VisualBasic.Syntax.UnitTests (6)
Syntax\SyntaxTokenFactoryTests.vb (6)
147Dim SourceText = "#if true then" & Environment.NewLine & "a + " & Environment.NewLine & "#end if" & Environment.NewLine & " + b" 159Assert.Equal("#if true then" & Environment.NewLine & "a + " & Environment.NewLine, expr2.ToFullString()) 228Dim id = SyntaxFactory.ParseToken("a ' goo " & Environment.NewLine)
Microsoft.CodeAnalysis.Workspaces (39)
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)
27=> exception.Message + Environment.NewLine + exception.StackTrace;
Notification\AbstractGlobalOperationNotificationService.cs (1)
40if (!Environment.HasShutdownStarted)
Remote\IRemoteKeepAliveService.cs (1)
71if (Environment.HasShutdownStarted)
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (2)
207var enabled = Environment.GetEnvironmentVariable("RoslynWaiterEnabled"); 228var enabled = Environment.GetEnvironmentVariable("RoslynWaiterDiagnosticTokenEnabled");
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
71private int _localRandom = Environment.TickCount; 74private static int s_sharedRandom = Environment.TickCount; 94var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingOptions2.cs (1)
48_ => 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)
284: reason + Environment.NewLine + restString;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\NonReentrantLock.cs (3)
46/// The <see cref="Environment.CurrentManagedThreadId" /> of the thread that holds the lock. Zero if no thread is holding 192return _owningThreadId == Environment.CurrentManagedThreadId; 203_owningThreadId = Environment.CurrentManagedThreadId;
Storage\SQLite\v2\Interop\SqlConnection.cs (1)
449NativeMethods.sqlite3_errmsg(handle) + Environment.NewLine +
Workspace\Host\PersistentStorage\IPersistentStorageConfiguration.cs (3)
51var appDataFolder = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.Create);
Workspace\ProjectSystem\FileWatchedPortableExecutableReferenceFactory.cs (7)
84if (Environment.GetEnvironmentVariable("DOTNET_ROOT") is string dotnetRoot && !string.IsNullOrEmpty(dotnetRoot)) 91referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), "Reference Assemblies", "Microsoft", "Framework")); 92referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "dotnet", "packs")); 109referenceDirectories.Add(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".nuget", "packages"));
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
MSBuild\BuildHostProcessManager.cs (2)
461_logger.LogError("The BuildHost process is not responding. Process output:{newLine}{processLog}", Environment.NewLine, processLog); 463_logger.LogError("The BuildHost process exited with {errorCode}. Process output:{newLine}{processLog}", _process.ExitCode, Environment.NewLine, processLog);
Rpc\RpcClient.cs (1)
62var message = $"Failed to deserialize response from build host:{Environment.NewLine}{line}";
src\Workspaces\Core\MSBuild.BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
25var path = Environment.GetEnvironmentVariable("PATH");
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
BuildHostLogger.cs (1)
31output.Write(Environment.NewLine);
Rpc\Contracts\MonoMSBuildDiscovery.cs (1)
25var path = Environment.GetEnvironmentVariable("PATH");
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Core\Portable\InternalUtilities\FailFast.cs (3)
42Environment.FailFast(exception.ToString(), exception); 52Environment.FailFast(message); 108Fail("ASSERT FAILED" + Environment.NewLine + message);
src\Compilers\Core\Portable\InternalUtilities\StringTable.cs (3)
71private int _localRandom = Environment.TickCount; 74private static int s_sharedRandom = Environment.TickCount; 94var pool = new ObjectPool<StringTable>(pool => new StringTable(pool), Environment.ProcessorCount * 2);
src\Compilers\Core\Portable\InternalUtilities\TextKeyedCache.cs (1)
88Environment.ProcessorCount * 4);
src\Dependencies\PooledObjects\ObjectPool`1.cs (1)
110: this(factory, Environment.ProcessorCount * 2, trimOnFree)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
NetCoreTests.cs (2)
345Assert.True(actualNames.SetEquals(expectedNames), $"Project names differ!{Environment.NewLine}Actual: {{{actualNames.Join(",")}}}{Environment.NewLine}Expected: {{{expectedNames.Join(",")}}}");
NewlyCreatedProjectsFromDotNetNew.cs (1)
263throw new InvalidOperationException(string.Join(Environment.NewLine,
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
MEF\ExportProviderCache.cs (1)
169"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)
112: $"{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.Package (4)
AbstractLanguageServer.cs (4)
119throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of parameters:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}"); 124throw new InvalidOperationException($"Language specific handlers for {methodGroup.Key} have mis-matched number of returns:{Environment.NewLine}{string.Join(Environment.NewLine, methodGroup)}");
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.Arcade.Sdk (2)
src\GenerateResxSource.cs (1)
248namespaceStart = $@"namespace {namespaceName}{Environment.NewLine}{{";
src\LocateDotNet.cs (1)
48var paths = Environment.GetEnvironmentVariable("PATH");
Microsoft.DotNet.AsmDiff (1)
DiffRecorder.cs (1)
133WriteToken(DiffTokenKind.LineBreak, Environment.NewLine);
Microsoft.DotNet.Build.Tasks.Feed (12)
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}";
Microsoft.DotNet.Build.Tasks.Installers (1)
src\GenerateJsonObjectString.cs (1)
121new[] {Environment.NewLine},
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.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)
285var 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.NuGetRepack.Tests (1)
TestHelpers\DiffUtil.cs (1)
96return DiffReport(exlines, aclines, separator: Environment.NewLine);
Microsoft.DotNet.Open.Api.Tools.Tests (1)
OpenApiAddURLTests.cs (1)
427"indicating failure. The url might be wrong, or there might be a networking issue." + Environment.NewLine, _error.ToString());
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.SharedFramework.Sdk (1)
src\ValidateFileVersions.cs (1)
86string.Concat(versionlessFiles.Select(f => Environment.NewLine + f)));
Microsoft.DotNet.SignCheck (3)
SignCheck.cs (2)
21private static readonly string _appData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SignCheck");
SignCheckTask.cs (1)
111ArtifactFolder = ArtifactFolder ?? Environment.CurrentDirectory;
Microsoft.DotNet.SignTool (6)
src\BatchSignUtil.cs (1)
49_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)
348var actualXmlElementsPerSigningRound = buildEngine.FilesToSign.Select(round => string.Join(Environment.NewLine, round));
Microsoft.DotNet.SourceBuild.Tasks (8)
src\UsageReport\ValidateUsageAgainstBaseline.cs (8)
49string ReviewRequestComment = $"<!-- {_reviewRequestMessage} -->{Environment.NewLine}"; 50string PreBuiltDocXmlComment = $"<!-- {_preBuiltDocMessage} -->{Environment.NewLine}"; 63File.WriteAllText(OutputBaselineFile, ReviewRequestComment + PreBuiltDocXmlComment + Environment.NewLine + data.ActualUsageData.ToXml().ToString()); 66File.WriteAllText(OutputReportFile, PreBuiltDocXmlComment + Environment.NewLine + data.Report.ToString()); 92$"report can be found at {OutputReportFile}.{Environment.NewLine}{_preBuiltDocMessage}{Environment.NewLine}" + 93$"Package IDs are:{Environment.NewLine}" + string.Join(Environment.NewLine, diff.Added.Select(u => u.ToString())));
Microsoft.DotNet.SwaggerGenerator.CmdLine (1)
Program.cs (1)
24Environment.Exit(-1);
Microsoft.DotNet.VersionTools (3)
Automation\DependencyUpdateResults.cs (1)
62Trace.TraceInformation($"git status --porcelain results:{Environment.NewLine}{status}");
Automation\VersionsRepoUpdater.cs (1)
39Environment.NewLine,
Dependencies\BuildOutput\ProjectJsonUpdater.cs (1)
76return JsonConvert.SerializeObject(projectRoot, Formatting.Indented) + Environment.NewLine;
Microsoft.DotNet.VersionTools.Cli (1)
Program.cs (1)
16CliRootCommand rootCommand = new("Microsoft.DotNet.VersionTools.Cli v" + Environment.Version.ToString(2))
Microsoft.DotNet.XUnitAssert.Tests (1119)
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 (130)
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 +
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)
CoreClrConfigurationDetection.cs (2)
42Environment.GetEnvironmentVariable("DOTNET_" + name) ?? Environment.GetEnvironmentVariable("COMPlus_" + name) ?? defaultValue;
DesktopTraceListener.cs (1)
26base(message + Environment.NewLine + detailMessage)
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"))) ||
Discoverers\SkipOnCIDiscoverer.cs (3)
19if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("DOTNET_CI")) || 20!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_WORKITEM_ROOT")) || 21!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("AGENT_OS")))
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.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)
46Load(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.DependencyInjection (2)
ServiceLookup\CallSiteFactory.cs (1)
537Environment.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 (1)
Windows\WindowsSnapshotProvider.cs (1)
108internal static int GetCpuUnits() => Environment.ProcessorCount;
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.FileProviders.Physical (1)
PhysicalFileProvider.cs (1)
190string? environmentValue = Environment.GetEnvironmentVariable(PollingEnvironmentKey);
Microsoft.Extensions.Hosting (3)
HostingHostBuilderExtensions.cs (2)
220string cwd = Environment.CurrentDirectory; 227!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,
Logging\LogHelper.cs (1)
81string? 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)
123textWriter.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)
59message += 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 (2)
DnsSrvServiceEndpointProviderFactory.cs (2)
117var host = Environment.GetEnvironmentVariable("KUBERNETES_SERVICE_HOST"); 118var port = Environment.GetEnvironmentVariable("KUBERNETES_SERVICE_PORT");
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)
21private static readonly CompositeFormat _title = CompositeFormat.Parse("Latency sample #{0}: {1}ms, {2} checkpoints, {3} tags, {4} measures" + Environment.NewLine); 22private static readonly Func<int, CompositeFormat> _rows = Memoize.Function((int nameColumnWidth) => CompositeFormat.Parse($" {{0,-{nameColumnWidth}}} | {{1}}" + Environment.NewLine));
Logging\ExtendedLogger.cs (2)
178trace = 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.Controls.Compatibility (2)
Tizen\FormsApplication.cs (2)
47 Environment.SetEnvironmentVariable("XDG_DATA_HOME", Current.DirectoryInfo.Data); 156 Run(System.Environment.GetCommandLineArgs());
Microsoft.Maui.Essentials (5)
AppActions\AppActions.uwp.cs (1)
54 var cliArgs = Environment.GetCommandLineArgs();
FileSystem\FileSystem.uwp.cs (4)
20 string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppSpecificPath, "Cache"); 39 string path = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), AppSpecificPath, "Data");
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)
29 var retryVariable = Environment.GetEnvironmentVariable ("DOTNET_ANDROID_FILE_WRITE_RETRY_ATTEMPTS"); 45 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)
82_timeOutOldValue = Environment.GetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable); 83Environment.SetEnvironmentVariable(ResourceManagerUtils.TimeoutEnvVariable, (3 * 60 * 1000).ToString()); 89Environment.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)
1774throw new ArgumentException($"Problems met when parsing JSON vocabulary object.{Environment.NewLine}Error message: {e.Message}"); 1814throw 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 (1)
src\Common\tests\RetryHelper.cs (1)
17private static readonly bool _debug = Environment.GetEnvironmentVariable("DEBUG_RETRYHELPER") == "1";
Microsoft.NET.StringTools (1)
WeakStringCache.Concurrent.cs (1)
20_stringsByHashCode = new ConcurrentDictionary<int, StringWeakHandle>(Environment.ProcessorCount, _initialCapacity);
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 = System.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(System.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 (30)
ErrorReporting\VisualStudioErrorReportingService.cs (1)
94string.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);
LanguageService\AbstractLanguageService`2.cs (1)
133if (!Environment.HasShutdownStarted && _isSetUp)
Log\VisualStudioErrorLogger.cs (1)
40=> 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)
31private static readonly string s_dummyThreeLineTitle = "A" + Environment.NewLine + "A" + Environment.NewLine + "A";
ProjectSystem\FileChangeTracker.cs (1)
65if (!Environment.HasShutdownStarted)
ProjectSystem\InvisibleEditor.cs (1)
190=> Debug.Assert(Environment.HasShutdownStarted, GetType().Name + " was leaked without Dispose being called.");
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (10)
132yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5"); 133yield return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86), @"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0"); 141Environment.GetFolderPath(Environment.SpecialFolder.Windows), 142Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), 143Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
Snippets\SnippetExpansionClient.cs (4)
1116string.Format(ServicesVSResources.The_following_references_were_not_found_0_Please_locate_and_add_them_manually, Environment.NewLine) 1117+ Environment.NewLine + Environment.NewLine 1118+ string.Join(Environment.NewLine, failedReferenceAdditions),
Venus\ContainedLanguageCodeSupport.cs (2)
242if (!newMemberText.EndsWith(Environment.NewLine, StringComparison.Ordinal)) 244newMemberText += Environment.NewLine;
Microsoft.VisualStudio.LanguageServices.CSharp (2)
Interactive\CSharpVsInteractiveWindowProvider.cs (2)
76Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
MinimalSample (4)
Program.cs (4)
12app.Logger.LogInformation($"Current process ID: {Environment.ProcessId}"); 18Operating System: {Environment.OSVersion} 19.NET version: {Environment.Version} 20Username: {Environment.UserName}
MSBuild (50)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
CommandLineSwitchException.cs (1)
75return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", commandLineArg);
CommunicationsUtilities.cs (4)
101string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 393=> Environment.SetEnvironmentVariable(name, value); 401var vars = Environment.GetEnvironmentVariables(); 705string environmentValue = Environment.GetEnvironmentVariable(environmentVariable);
DebugUtils.cs (5)
32string environmentDebugPath = FileUtilities.TrimAndStripAnyQuotes(Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH")); 53Environment.SetEnvironmentVariable("MSBUILDDEBUGPATH", debugDirectory); 68return ScanNodeMode(Environment.CommandLine); 93var processNameToBreakInto = Environment.GetEnvironmentVariable("MSBuildDebugProcessName"); 101$"{ProcessNodeMode.Value}_{Process.GetCurrentProcess().ProcessName}_PID={Process.GetCurrentProcess().Id}_x{(Environment.Is64BitProcess ? "64" : "86")}";
ErrorUtilities.cs (1)
25private static readonly bool s_enableMSBuildDebugTracing = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDENABLEDEBUGTRACING"));
ExceptionHandling.cs (3)
397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETRETRYTIMEOUT"), out retryTimeOut))
InitializationException.cs (2)
80return base.Message + Environment.NewLine + ResourceUtilities.FormatResourceStringStripCodeAndKeyword("InvalidSwitchIndicator", invalidSwitch); 149errorMessage += Environment.NewLine + e.ToString();
LogMessagePacketBase.cs (2)
266private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
Modifiers.cs (1)
31private static readonly bool s_traceModifierCasing = (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTRACEMODIFIERCASING")));
OutOfProcTaskHostNode.cs (1)
777if (Environment.GetEnvironmentVariable("MSBUILDTASKHOSTABORTTASKONCANCEL") == "1")
PerformanceLogEventListener.cs (1)
56string logDirectory = Environment.GetEnvironmentVariable(PerfLogDirEnvVar);
TempFileUtilities.cs (1)
44msbuildTempFolderPrefix + Environment.UserName;
TerminalLogger\TerminalLogger.cs (1)
113private readonly string _initialWorkingDirectory = Environment.CurrentDirectory;
XMake.cs (23)
254if (Environment.GetEnvironmentVariable("MSBUILDDUMPPROCESSCOUNTERS") == "1") 261Environment.GetEnvironmentVariable(Traits.UseMSBuildServerEnvVarName) == "1" && 294if (Environment.GetEnvironmentVariable("MSBUILDDUMPPROCESSCOUNTERS") == "1") 621switch (Environment.GetEnvironmentVariable("MSBUILDDEBUGONSTART")) 663Environment.SetEnvironmentVariable("MSBuildLoadMicrosoftTargetsReadOnly", "true"); 811Environment.SetEnvironmentVariable("MSBUILDLOADALLFILESASWRITEABLE", "1"); 909string timerOutputFilename = Environment.GetEnvironmentVariable("MSBUILDTIMEROUTPUTS"); 1052if (Environment.GetEnvironmentVariable("MSBUILDDONOTLAUNCHDEBUGGER") != "1") 1149Environment.Exit(1); // the process will now be terminated rudely 1204Environment.Exit(0); // the process can now be terminated as everything has already been gracefully cancelled. 1466if (!string.Equals(Environment.GetEnvironmentVariable("MSBUILDLOGASYNC"), "1", StringComparison.Ordinal)) 1509string memoryUseLimit = Environment.GetEnvironmentVariable("MSBUILDMEMORYUSELIMIT"); 1754Environment.CurrentDirectory), 1882(Environment.OSVersion.Platform != PlatformID.Win32NT || 1883Environment.OSVersion.Version.Major < 6 || 1884(Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor < 1))) // Windows 7 is minimum 2261argsFromResponseFile.AddRange(QuotingUtilities.SplitUnquoted(Environment.ExpandEnvironmentVariables(responseFileLine))); 2544Environment.SetEnvironmentVariable("_MSBUILDTLENABLED", useTerminalLogger ? "1" : "0"); 2892string dotnetCliEnvVar = Environment.GetEnvironmentVariable("DOTNET_CLI_CONFIGURE_MSBUILD_TERMINAL_LOGGER"); 2927string liveLoggerArg = Environment.GetEnvironmentVariable("MSBUILDLIVELOGGER"); 2928terminalLoggerArg = Environment.GetEnvironmentVariable("MSBUILDTERMINALLOGGER"); 3181if (Environment.GetEnvironmentVariable("MSBUILDDISABLENODEREUSE") == "1") // For example to disable node reuse in a gated checkin, without using the flag
MSBuildTaskHost (79)
BuildEnvironmentHelper.cs (2)
459return Environment.GetEnvironmentVariable(variable); 685return Environment.GetEnvironmentVariable("MSBuildSDKsPath") ?? defaultSdkPath;
ChangeWaves.cs (1)
128string msbuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION");
CommunicationsUtilities.cs (3)
101string handshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 705string environmentValue = Environment.GetEnvironmentVariable(environmentVariable); 814Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH");
Constants.cs (1)
131internal 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)
67Environment.GetEnvironmentVariable("MSBUILDDEBUGPATH"); 397builder.Append(Environment.NewLine); 400builder.Append(Environment.NewLine); 402builder.Append(Environment.NewLine);
FileUtilities.cs (2)
875if (!int.TryParse(Environment.GetEnvironmentVariable("MSBUILDDIRECTORYDELETERETRYCOUNT"), out retryCount)) 880if (!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)
266private static readonly int s_defaultPacketVersion = (Environment.Version.Major * 10) + Environment.Version.Minor;
Modifiers.cs (1)
31private static readonly bool s_traceModifierCasing = (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDTRACEMODIFIERCASING")));
NativeMethods.cs (2)
495int numberOfCpus = Environment.ProcessorCount; 1125Version osVersion = Environment.OSVersion.Version;
OutOfProcTaskHost.cs (1)
84switch (Environment.GetEnvironmentVariable("MSBUILDDEBUGONSTART"))
OutOfProcTaskHostNode.cs (1)
777if (Environment.GetEnvironmentVariable("MSBUILDTASKHOSTABORTTASKONCANCEL") == "1")
Traits.cs (55)
33DebugScheduler = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGSCHEDULER")); 34DebugNodeCommunication = DebugEngine || !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDDEBUGCOMM")); 39internal readonly string MSBuildDisableFeaturesFromVersion = Environment.GetEnvironmentVariable("MSBUILDDISABLEFEATURESFROMVERSION"); 44public readonly bool UseLazyWildCardEvaluation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildSkipEagerWildCardEvaluationRegexes")); 45public readonly bool LogExpandedWildcards = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGEXPANDEDWILDCARDS")); 46public readonly bool ThrowOnDriveEnumeratingWildcard = Environment.GetEnvironmentVariable("MSBUILDFAILONDRIVEENUMERATINGWILDCARD") == "1"; 51public readonly bool CacheFileExistence = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileExistence")); 53public readonly bool UseSimpleProjectRootElementCacheConcurrency = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildUseSimpleProjectRootElementCacheConcurrency")); 58public readonly bool MSBuildCacheFileEnumerations = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildCacheFileEnumerations")); 60public readonly bool EnableAllPropertyFunctions = Environment.GetEnvironmentVariable("MSBUILDENABLEALLPROPERTYFUNCTIONS") == "1"; 65public readonly bool EnableRestoreFirst = Environment.GetEnvironmentVariable("MSBUILDENABLERESTOREFIRST") == "1"; 70public static readonly string MSBuildNodeHandshakeSalt = Environment.GetEnvironmentVariable("MSBUILDNODEHANDSHAKESALT"); 75public readonly bool ForceEvaluateAsFullFramework = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildForceEvaluateAsFullFramework")); 88public readonly bool EmitSolutionMetaproj = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildEmitSolution")); 98public readonly bool SolutionBatchTargets = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildSolutionBatchTargets")); 103public readonly bool LogPropertyFunctionsRequiringReflection = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildLogPropertyFunctionsRequiringReflection")); 108public readonly bool LogAllAssemblyLoads = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLASSEMBLYLOADS")); 113public static bool LogAllEnvironmentVariables = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")); 130public readonly bool DebugEngine = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugEngine")); 133public readonly bool DebugUnitTests = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDebugUnitTests")); 135public readonly bool InProcNodeDisabled = Environment.GetEnvironmentVariable("MSBUILDNOINPROCNODE") == "1"; 148return int.TryParse(Environment.GetEnvironmentVariable(environmentVariable), out int result) 159public readonly bool DoNotSendDeferredMessagesToBuildManager = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MsBuildDoNotSendDeferredMessagesToBuildManager")); 165public readonly bool DoNotExpandQualifiedMetadataInUpdateOperation = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBuildDoNotExpandQualifiedMetadataInUpdateOperation")); 175public readonly bool AlwaysUseContentTimestamp = Environment.GetEnvironmentVariable("MSBUILDALWAYSCHECKCONTENTTIMESTAMP") == "1"; 181public readonly bool TruncateTaskInputs = Environment.GetEnvironmentVariable("MSBUILDTRUNCATETASKINPUTS") == "1"; 186public readonly bool DoNotTruncateConditions = Environment.GetEnvironmentVariable("MSBuildDoNotTruncateConditions") == "1"; 191public readonly bool AlwaysEvaluateDangerousGlobs = Environment.GetEnvironmentVariable("MSBuildAlwaysEvaluateDangerousGlobs") == "1"; 196public readonly bool AlwaysDoImmutableFilesUpToDateCheck = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHEMODIFICATIONTIME") == "1"; 201public readonly bool CopyWithoutDelete = Environment.GetEnvironmentVariable("MSBUILDCOPYWITHOUTDELETE") == "1"; 218_logProjectImports = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGIMPORTS")); 235_logTaskInputs = Environment.GetEnvironmentVariable("MSBUILDLOGTASKINPUTS") == "1"; 254var variable = Environment.GetEnvironmentVariable("MSBUILDLOGPROPERTIESANDITEMSAFTEREVALUATION"); 274public readonly bool CacheAssemblyInformation = Environment.GetEnvironmentVariable("MSBUILDDONOTCACHERARASSEMBLYINFORMATION") != "1"; 281public readonly bool UseSymlinkTimeInsteadOfTargetTime = Environment.GetEnvironmentVariable("MSBUILDUSESYMLINKTIMESTAMP") == "1"; 286public readonly bool ReuseTaskHostNodes = Environment.GetEnvironmentVariable("MSBUILDREUSETASKHOSTNODES") == "1"; 291public readonly bool IgnoreEmptyImports = Environment.GetEnvironmentVariable("MSBUILDIGNOREEMPTYIMPORTS") == "1"; 296public readonly bool IgnoreTreatAsLocalProperty = Environment.GetEnvironmentVariable("MSBUILDIGNORETREATASLOCALPROPERTY") != null; 301public readonly bool DebugEvaluation = Environment.GetEnvironmentVariable("MSBUILDDEBUGEVALUATION") != null; 306public readonly bool WarnOnUninitializedProperty = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDWARNONUNINITIALIZEDPROPERTY")); 314public readonly bool UseCaseSensitiveItemNames = Environment.GetEnvironmentVariable("MSBUILDUSECASESENSITIVEITEMNAMES") == "1"; 319public readonly bool DisableLongPaths = Environment.GetEnvironmentVariable("MSBUILDDISABLELONGPATHS") == "1"; 324public readonly bool DisableSdkResolutionCache = Environment.GetEnvironmentVariable("MSBUILDDISABLESDKCACHE") == "1"; 329public readonly bool TargetPathForRelatedFiles = Environment.GetEnvironmentVariable("MSBUILDTARGETPATHFORRELATEDFILES") == "1"; 334public readonly bool UseSingleLoadContext = Environment.GetEnvironmentVariable("MSBUILDSINGLELOADCONTEXT") == "1"; 339public readonly bool UseAutoRunWhenLaunchingProcessUnderCmd = Environment.GetEnvironmentVariable("MSBUILDUSERAUTORUNINCMD") == "1"; 344public readonly bool AvoidUnicodeWhenWritingToolTaskBatch = Environment.GetEnvironmentVariable("MSBUILDAVOIDUNICODE") == "1"; 349public readonly bool EnsureStdOutForChildNodesIsPrimaryStdout = Environment.GetEnvironmentVariable("MSBUILDENSURESTDOUTFORTASKPROCESSES") == "1"; 357public readonly bool UseMinimalResxParsingInCoreScenarios = Environment.GetEnvironmentVariable("MSBUILDUSEMINIMALRESX") == "1"; 365public readonly bool DoNotVersionBuildResult = Environment.GetEnvironmentVariable("MSBUILDDONOTVERSIONBUILDRESULT") == "1"; 370public readonly bool DoNotLimitBuildCheckResultsNumber = Environment.GetEnvironmentVariable("MSBUILDDONOTLIMITBUILDCHECKRESULTSNUMBER") == "1"; 402var value = Environment.GetEnvironmentVariable("MSBUILDCUSTOMBUILDEVENTWARNING"); 429var value = Environment.GetEnvironmentVariable(environmentVariable); 448var mode = Environment.GetEnvironmentVariable("MSBUILD_PROJECTINSTANCE_TRANSLATION_MODE"); 472var 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 (43)
Startup.cs (43)
36await context.Response.WriteAsync("Hello World - " + DateTimeOffset.Now + Environment.NewLine); 37await context.Response.WriteAsync(Environment.NewLine); 39await context.Response.WriteAsync("Address:" + Environment.NewLine); 40await context.Response.WriteAsync("Scheme: " + context.Request.Scheme + Environment.NewLine); 41await context.Response.WriteAsync("Host: " + context.Request.Headers["Host"] + Environment.NewLine); 42await context.Response.WriteAsync("PathBase: " + context.Request.PathBase.Value + Environment.NewLine); 43await context.Response.WriteAsync("Path: " + context.Request.Path.Value + Environment.NewLine); 44await context.Response.WriteAsync("Query: " + context.Request.QueryString.Value + Environment.NewLine); 45await context.Response.WriteAsync(Environment.NewLine); 47await context.Response.WriteAsync("Connection:" + Environment.NewLine); 48await context.Response.WriteAsync("RemoteIp: " + context.Connection.RemoteIpAddress + Environment.NewLine); 49await context.Response.WriteAsync("RemotePort: " + context.Connection.RemotePort + Environment.NewLine); 50await context.Response.WriteAsync("LocalIp: " + context.Connection.LocalIpAddress + Environment.NewLine); 51await context.Response.WriteAsync("LocalPort: " + context.Connection.LocalPort + Environment.NewLine); 52await context.Response.WriteAsync("ClientCert: " + context.Connection.ClientCertificate + Environment.NewLine); 53await context.Response.WriteAsync(Environment.NewLine); 55await context.Response.WriteAsync("User: " + context.User.Identity.Name + Environment.NewLine); 59await context.Response.WriteAsync("DisplayName: " + scheme?.DisplayName + Environment.NewLine); 62await context.Response.WriteAsync(Environment.NewLine); 64await context.Response.WriteAsync("Headers:" + Environment.NewLine); 67await context.Response.WriteAsync(header.Key + ": " + header.Value + Environment.NewLine); 69await context.Response.WriteAsync(Environment.NewLine); 71await context.Response.WriteAsync("Environment Variables:" + Environment.NewLine); 72var vars = Environment.GetEnvironmentVariables(); 76await context.Response.WriteAsync(key + ": " + value + Environment.NewLine); 78await context.Response.WriteAsync(Environment.NewLine); 81await context.Response.WriteAsync("Server Variables:" + Environment.NewLine); 85await context.Response.WriteAsync(varName + ": " + context.GetServerVariable(varName) + Environment.NewLine); 88await context.Response.WriteAsync(Environment.NewLine); 98await context.Response.WriteAsync(Environment.NewLine); 104await context.Response.WriteAsync(key + Environment.NewLine); 109await context.Response.WriteAsync(Environment.NewLine); 110await context.Response.WriteAsync("IIS Environment Information:" + Environment.NewLine); 111await context.Response.WriteAsync("IIS Version: " + envFeature.IISVersion + Environment.NewLine); 112await context.Response.WriteAsync("ApplicationId: " + envFeature.ApplicationId + Environment.NewLine); 113await context.Response.WriteAsync("Application Path: " + envFeature.ApplicationPhysicalPath + Environment.NewLine); 114await context.Response.WriteAsync("Application Virtual Path: " + envFeature.ApplicationVirtualPath + Environment.NewLine); 115await context.Response.WriteAsync("Application Config Path: " + envFeature.AppConfigPath + Environment.NewLine); 116await context.Response.WriteAsync("AppPool ID: " + envFeature.AppPoolId + Environment.NewLine); 117await context.Response.WriteAsync("AppPool Config File: " + envFeature.AppPoolConfigFile + Environment.NewLine); 118await context.Response.WriteAsync("Site ID: " + envFeature.SiteId + Environment.NewLine); 119await context.Response.WriteAsync("Site Name: " + envFeature.SiteName + Environment.NewLine); 123await 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);
PrepareTests (1)
TestDiscovery.cs (1)
132Console.WriteLine($"Failed to discover tests in {pathToAssembly}:{Environment.NewLine}{errorOutput}");
PresentationBuildTasks (2)
MS\Internal\Tasks\TaskHelper.cs (2)
53log.LogMessage(MessageImportance.Low,Environment.NewLine); 56log.LogMessage(MessageImportance.Low, Environment.NewLine);
PresentationCore (92)
MS\Internal\AppModel\SiteOfOriginContainer.cs (2)
48Environment.CurrentManagedThreadId + 195Environment.CurrentManagedThreadId +
MS\Internal\AppModel\SiteOfOriginPart.cs (9)
52Environment.CurrentManagedThreadId + 64Environment.CurrentManagedThreadId + 92Environment.CurrentManagedThreadId + 108Environment.CurrentManagedThreadId + 122Environment.CurrentManagedThreadId + 135Environment.CurrentManagedThreadId + 161Environment.CurrentManagedThreadId + 185Environment.CurrentManagedThreadId + 195Environment.CurrentManagedThreadId +
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (1)
99windowThreadProcessId = Environment.ProcessId;
MS\Internal\FontCache\FamilyCollection.cs (1)
157OperatingSystem osInfo = Environment.OSVersion;
MS\Internal\FontCache\FontCacheUtil.cs (1)
306string s = Environment.GetEnvironmentVariable(WinDir) + @"\Fonts\";
System\IO\Packaging\PackWebRequest.cs (3)
83Environment.CurrentManagedThreadId + ": " + 155Environment.CurrentManagedThreadId + ": " + 171Environment.CurrentManagedThreadId + ": " +
System\IO\Packaging\PackWebRequestFactory.cs (3)
67Environment.CurrentManagedThreadId + ": " + 106Environment.CurrentManagedThreadId + ": " + 119Environment.CurrentManagedThreadId + ": " +
System\IO\Packaging\PackWebResponse.cs (22)
71Environment.CurrentManagedThreadId + ": " + 94Environment.CurrentManagedThreadId + ": " + 104Environment.CurrentManagedThreadId + ": " + 138Environment.CurrentManagedThreadId + ": " + 177Environment.CurrentManagedThreadId + ": " + 199Environment.CurrentManagedThreadId + ": " + 491Environment.CurrentManagedThreadId + ": " + 511Environment.CurrentManagedThreadId + ": " + 524Environment.CurrentManagedThreadId + ": " + 550Environment.CurrentManagedThreadId + ": " + 609Environment.CurrentManagedThreadId + ": " + 626Environment.CurrentManagedThreadId + ": " + 635Environment.CurrentManagedThreadId + ": " + 653Environment.CurrentManagedThreadId + ": " + 666Environment.CurrentManagedThreadId + ": " + 677Environment.CurrentManagedThreadId + ": " + 779Environment.CurrentManagedThreadId + ": " + 801Environment.CurrentManagedThreadId + ": " + 816Environment.CurrentManagedThreadId + ": " + 845Environment.CurrentManagedThreadId + ": " + 887Environment.CurrentManagedThreadId + ": " + 902Environment.CurrentManagedThreadId + ": " +
System\Windows\Automation\Peers\AutomationPeer.cs (2)
1455return new int [] { 7, Environment.ProcessId, this.GetHashCode() }; 2487private static object GetCurrentProcessId(AutomationPeer peer) { return Environment.ProcessId; }
System\Windows\Diagnostics\VisualDiagnostics.cs (1)
226value = Environment.GetEnvironmentVariable(environmentVariable);
System\Windows\Input\KeyboardDevice.cs (1)
268int timeStamp = Environment.TickCount ;
System\Windows\Input\ManipulationLogic.cs (1)
416ManipulationStartingEventArgs starting = new ManipulationStartingEventArgs(_manipulationDevice, Environment.TickCount);
System\Windows\Input\MouseDevice.cs (3)
280int timeStamp = Environment.TickCount; 887int timeStamp = Environment.TickCount; 936int timeStamp = Environment.TickCount;
System\Windows\Input\Stylus\Common\DynamicRenderer.cs (1)
261Environment.TickCount, GetCurrentHostVisual());
System\Windows\Input\Stylus\Common\DynamicRendererThreadManager.cs (1)
241if (__inkingDispatcher != null && !Environment.HasShutdownStarted)
System\Windows\Input\Stylus\Common\MultiTouchSystemGestureLogic.cs (3)
64_firstDownTime = Environment.TickCount; 87_firstUpTime = Environment.TickCount; 186int now = Environment.TickCount;
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (3)
313Environment.TickCount, 350Environment.TickCount, 443Environment.TickCount,
System\Windows\Input\Stylus\Pointer\PointerStylusDevice.cs (4)
529int timeStamp = Environment.TickCount; 627int timeStamp = Environment.TickCount; 786_lastEventTimeTicks = Environment.TickCount; 838Environment.TickCount,
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (8)
152Debug.WriteLine("WorkerOperationGetTabletsInfo.OnDoWork failed due to: {0}{1}", Environment.NewLine, e.ToString()); 199result.CommHandle = Environment.Is64BitProcess ? (nint)commHandle : (int)commHandle; 208Debug.WriteLine("WorkerOperationCreateContext.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 315Debug.WriteLine("WorkerOperationRefreshCursorInfo.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 357Debug.WriteLine("WorkerOperationGetTabletInfo.OnDoWork failed due to {0}{1}", Environment.NewLine, e.ToString()); 397Debug.WriteLine("WorkerOperationWorkerGetUpdatedSizes.OnDoWork failed due to a {0}{1}", Environment.NewLine, e.ToString()); 798int timestamp = Environment.TickCount; 1251penContext.FirePenOutOfRange(0, Environment.TickCount);
System\Windows\Input\Stylus\Wisp\WispLogic.cs (3)
909_lastInRangeTime = Environment.TickCount; 999_lastInRangeTime = Environment.TickCount; 1004_lastInRangeTime = Environment.TickCount;
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (2)
224int timeStamp = Environment.TickCount; 338int timeStamp = Environment.TickCount;
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
83bool runningOnVista = (Environment.OSVersion.Version.Major >= VistaMajorVersion);
System\Windows\Input\TextCompositionEventArgs.cs (1)
28public TextCompositionEventArgs(InputDevice inputDevice, TextComposition composition) : base(inputDevice, Environment.TickCount)
System\Windows\Input\TextServicesContext.cs (1)
111if (!appDomainShutdown || System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Input\Touch.cs (1)
41TouchFrameEventArgs args = new TouchFrameEventArgs(Environment.TickCount);
System\Windows\Input\TouchDevice.cs (1)
940TouchEventArgs touchEventArgs = new TouchEventArgs(this, Environment.TickCount);
System\Windows\InterOp\HwndPointerInputProvider.cs (5)
411handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.InRange, Environment.TickCount); 416handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Move, Environment.TickCount); 421handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Down, Environment.TickCount); 426handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.Up, Environment.TickCount); 434handled = ProcessMessage(GetPointerId(wParam), RawStylusActions.OutOfRange, Environment.TickCount);
System\Windows\InterOp\HwndTarget.cs (3)
162/// identified by <see cref="Environment.UserInteractive"/>. 166/// <see cref="Environment.UserInteractive"/>, and (b) a registry override that requests 532else if (processId != Environment.ProcessId)
System\Windows\Interop\OperatingSystemVersionCheck.cs (1)
50OperatingSystem os = Environment.OSVersion;
System\Windows\Media\MediaContext.cs (1)
174!Environment.UserInteractive ? // IF DisplayDevicesNotAvailable && IsNonInteractiveWindowStation/IsService...
System\Windows\MouseOverProperty.cs (1)
47MouseEventArgs mouseEventArgs = new MouseEventArgs(Mouse.PrimaryDevice, Environment.TickCount, Mouse.PrimaryDevice.StylusDevice);
System\Windows\StylusOverProperty.cs (1)
39StylusEventArgs stylusEventArgs = new StylusEventArgs(Stylus.CurrentStylusDevice, Environment.TickCount);
PresentationFramework (23)
Microsoft\Win32\CommonDialog.cs (2)
72if (!Environment.UserInteractive) 149if (!Environment.UserInteractive)
System\Windows\Application.cs (1)
2262System.Environment.ExitCode = exitCode;
System\Windows\Controls\ScrollViewer.cs (2)
1770_panningInfo.InertiaBoundaryBeginTimestamp = Environment.TickCount; 1845if (Math.Abs(Environment.TickCount - _panningInfo.InertiaBoundaryBeginTimestamp) < PanningInfo.InertiaBoundryMinimumTicks)
System\Windows\Controls\VirtualizingStackPanel.cs (2)
9102int totalMilliseconds = Environment.TickCount - startTickCount; 9412int startMilliseconds = Environment.TickCount;
System\Windows\Controls\WebBrowser.cs (1)
753Version osver = Environment.OSVersion.Version;
System\windows\Documents\TextEditor.cs (1)
1238int endOfFirstLine = textData.IndexOf(Environment.NewLine, StringComparison.Ordinal);
System\windows\Documents\TextEditorTyping.cs (2)
1144string filteredText = This._FilterText(Environment.NewLine, This.Selection); 1148This.Selection.Text = Environment.NewLine;
System\Windows\Documents\TextFindEngine.cs (1)
475if (System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Documents\TextRangeBase.cs (4)
695textBuffer.Append(Environment.NewLine); 716textBuffer.Append(Environment.NewLine); 782textBuffer.Append(Environment.NewLine); 788textBuffer.Append(Environment.NewLine);
System\Windows\Documents\TextServicesHost.cs (1)
376if (_thread == Thread.CurrentThread || System.Environment.OSVersion.Version.Major >= 6)
System\Windows\Documents\TextStore.cs (2)
1498if (!(nextChars[0] == Environment.NewLine[0] && nextChars[1] == Environment.NewLine[1]))
System\Windows\Interop\HwndHost.cs (1)
1050(idWindowProcess == Environment.ProcessId))
System\Windows\Standard\Utilities.cs (1)
23private static readonly Version _osVersion = Environment.OSVersion.Version;
System\Windows\StartupEventArgs.cs (1)
56string[] args = Environment.GetCommandLineArgs();
System\Windows\SystemParameters.cs (1)
1193if (System.Environment.OSVersion.Version.Major >= 6)
PresentationUI (2)
MS\Internal\Documents\RightsManagementManager.cs (2)
872string 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 (10)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (3)
119loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 152var threadId = Environment.CurrentManagedThreadId; 154string output = prefix + message + Environment.NewLine;
src\Compilers\Core\Portable\InternalUtilities\Debug.cs (2)
58if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("HELIX_DUMP_FOLDER"))) 68Environment.FailFast(message);
src\Compilers\Shared\BuildServerConnection.cs (3)
207var originalThreadId = Environment.CurrentManagedThreadId; 268var releaseThreadId = Environment.CurrentManagedThreadId; 553var userName = Environment.UserName;
src\Compilers\Shared\RuntimeHostInfo.cs (2)
61if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is string pathToDotNet) 70var path = Environment.GetEnvironmentVariable("PATH") ?? "";
Roslyn.Compilers.Extension (2)
CompilerPackage.cs (2)
175var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Roslyn.Compilers.VisualBasic.IOperation.UnitTests (2)
IOperation\IOperationTests_InvalidExpression.vb (2)
943VerifyOperationTreeAndDiagnosticsForTest(Of InvocationExpressionSyntax)("Option Strict On" + Environment.NewLine + source, expectedStrictOperationTree, expectedDiagnostics) 958VerifyOperationTreeAndDiagnosticsForTest(Of InvocationExpressionSyntax)("Option Strict Off" + Environment.NewLine + source, expectedNonStrictOperationTree, expectedDiagnostics:=String.Empty)
Roslyn.Test.PdbUtilities (3)
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)
122var random = new Random(Environment.TickCount);
RoutingSandbox (1)
Program.cs (1)
61.UseContentRoot(Environment.CurrentDirectory)
RoutingWebSite (1)
Program.cs (1)
63.UseContentRoot(Environment.CurrentDirectory)
RunTests (25)
ConsoleUtil.cs (1)
18Logger.Log(message + Environment.NewLine);
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)); 246ConsoleUtil.WriteLine(string.Join(Environment.NewLine, processOutput.OutputLines)); 262ConsoleUtil.WriteLine(string.Join(Environment.NewLine, output.OutputLines)); 263ConsoleUtil.WriteLine(string.Join(Environment.NewLine, output.ErrorLines)); 334var 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)
129var envVar = Environment.GetEnvironmentVariable(envVarName);
TestRunner.cs (14)
48var sourceBranch = Environment.GetEnvironmentVariable("BUILD_SOURCEBRANCH"); 53Environment.SetEnvironmentVariable("BUILD_SOURCEBRANCH", sourceBranch); 62var isAzureDevOpsRun = Environment.GetEnvironmentVariable("BUILD_BUILDID") is not null; 75var queuedBy = Environment.GetEnvironmentVariable("BUILD_QUEUEDBY")?.Replace(" ", ""); 82var jobName = Environment.GetEnvironmentVariable("SYSTEM_JOBDISPLAYNAME"); 88if (Environment.GetEnvironmentVariable("BUILD_REPOSITORY_NAME") is null) 89Environment.SetEnvironmentVariable("BUILD_REPOSITORY_NAME", "dotnet/roslyn"); 91if (Environment.GetEnvironmentVariable("SYSTEM_TEAMPROJECT") is null) 92Environment.SetEnvironmentVariable("SYSTEM_TEAMPROJECT", "dnceng"); 94if (Environment.GetEnvironmentVariable("BUILD_REASON") is null) 95Environment.SetEnvironmentVariable("BUILD_REASON", "pr"); 97var buildNumber = Environment.GetEnvironmentVariable("BUILD_BUILDNUMBER") ?? "0"; 214if (Environment.GetEnvironmentVariable(knownEnvironmentVariable) is string { Length: > 0 } value) 328var max = _options.Sequential ? 1 : (int)(Environment.ProcessorCount * 1.5);
Security.TransportSecurity.IntegrationTests (4)
Negotiate\NegotiateStream_Http_Tests.4.1.0.cs (1)
83if (Environment.Version.Major == 5 && !OSID.AnyWindows.MatchesCurrent() && !TestProperties.GetProperty(TestProperties.ServiceUri_PropertyName).Contains("/"))
Tcp\ClientCredentialTypeCertificateCanonicalNameTests.4.1.0.cs (3)
86errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 162errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message); 246errorBuilder.AppendFormat("Exception message: {0}{1}", Environment.NewLine, exception.Message);
SemanticSearch.BuildTask (1)
GenerateFilteredReferenceAssembliesTask.cs (1)
74Log.LogError($"GenerateFilteredReferenceAssembliesTask failed with exception:{Environment.NewLine}{e}");
ServerComparison.TestSites (1)
Program.cs (1)
37Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"),
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)
90var urls = Environment.GetEnvironmentVariable("ASPNETCORE_URLS")!.Split(';'); 127new KeyValuePair<string, object?>("Tid", Environment.CurrentManagedThreadId), 128new KeyValuePair<string, object?>("Pid", Environment.ProcessId),
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 (13)
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\ConcurrentDictionary.cs (1)
2079private static int DefaultConcurrencyLevel => Environment.ProcessorCount;
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.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)
53string? 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); 260return 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)
32return Environment.ProcessId; 40return Environment.CurrentManagedThreadId.ToString(CultureInfo.InvariantCulture); 54public string Callstack => _stackTrace ??= 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.Combine(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)
1160$"{dirName}/PaxHeaders.{Environment.ProcessId}/{fileName}{Path.DirectorySeparatorChar}" : 1161$"{dirName}/PaxHeaders.{Environment.ProcessId}/{fileName}"; 1177string 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)
126ConnectInternal(timeout, CancellationToken.None, Environment.TickCount); 159while (timeout == Timeout.Infinite || (elapsed = unchecked(Environment.TickCount - startTime)) < timeout); 192int 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)
921ticksWhenIdleStarted = Environment.TickCount; 923else 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 (32)
System\Net\Http\Headers\HttpHeaders.cs (1)
303vsb.Append(Environment.NewLine);
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
43Environment.GetEnvironmentVariable(UsePortInSpnEnvironmentVariable) is string envVar &&
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (4)
887return connection.GetLifetimeTicks(Environment.TickCount64) > pooledConnectionLifetime.TotalMilliseconds; 898return lifetime == TimeSpan.Zero || connection.GetLifetimeTicks(Environment.TickCount64) > lifetime.TotalMilliseconds; 976long nowTicks = Environment.TickCount64; 1032OperatingSystem os = Environment.OSVersion;
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)
161_nextPingRequestTimestamp = Environment.TickCount64 + _keepAlivePingDelay; 2085_nextPingRequestTimestamp = Environment.TickCount64 + _keepAlivePingDelay; 2119long 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; 99_connectionMetrics?.ConnectionClosed(durationMs: Environment.TickCount64 - _creationTickCount); 115_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)
24string? envVar = Environment.GetEnvironmentVariable(environmentVariableSettingName); 79string? envVar = Environment.GetEnvironmentVariable(environmentVariableSettingName); 93string? 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 (20)
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 (2)
134int labelLineStart = fileContents.LastIndexOf(Environment.NewLine, labelIndex, StringComparison.Ordinal); 143int 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\Net\Security\SslKeyLogger.cs (1)
11private static readonly string? s_keyLogFile = Environment.GetEnvironmentVariable("SSLKEYLOGFILE");
System\Net\Quic\Internal\MsQuicApi.cs (1)
202NotSupportedReason = $"Current Windows version ({Environment.OSVersion}) is not supported by QUIC. Minimal supported version is {s_minWindowsVersion}.";
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (1)
31else if (Environment.GetEnvironmentVariable(DisableCacheEnvironmentVariable) is string envVar)
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 (5)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
92string? 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\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)
25internal static readonly bool InlineSocketCompletionsEnabled = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_INLINE_COMPLETIONS") == "1"; 41if (uint.TryParse(Environment.GetEnvironmentVariable("DOTNET_SYSTEM_NET_SOCKETS_THREAD_COUNT"), out uint count)) 49return Environment.ProcessorCount; 57return Math.Max(1, (int)Math.Round(Environment.ProcessorCount / (double)coresPerEngine)); 217Environment.FailFast("Exception thrown from SocketAsyncEngine event loop: " + e.ToString(), e); 286int startTimeMs = Environment.TickCount; 303} 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; 193NextPingRequestTimestamp = Environment.TickCount64 + DelayMs; 204NextPingRequestTimestamp = Environment.TickCount64 + DelayMs; 239PingTimeoutTimestamp = Environment.TickCount64 + TimeoutMs;
System.Numerics.Tensors (7)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (3)
92if (Environment.Is64BitProcess) 187if (Environment.Is64BitProcess) 235if (Environment.Is64BitProcess)
System\Numerics\Tensors\netcore\Tensor.cs (1)
73if (Environment.Is64BitProcess)
System\Numerics\Tensors\netcore\TensorSpan.cs (3)
94if (Environment.Is64BitProcess) 189if (Environment.Is64BitProcess) 236if (Environment.Is64BitProcess)
System.Private.CoreLib (183)
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)
16Write(s + Environment.NewLineConst); 19Write(Environment.NewLineConst); 24Write(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)
173SR.AppDomain_Name + FriendlyName + Environment.NewLineConst + SR.AppDomain_NoContextPolicies; 221public 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\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)
3434msg += Environment.NewLine; 3837Debugger.Log(0, null, $"EventSource Error: {msg}{Environment.NewLine}");
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\RuntimeEventSource.cs (2)
88_workingSetCounter ??= new PollingCounter("working-set", this, () => ((double)Environment.WorkingSet / 1_000_000)) { DisplayName = "Working Set", DisplayUnits = "MB" }; 121ProcessorCount(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)
259public static string GetCurrentDirectory() => Environment.CurrentDirectory; 265Environment.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)
53string? 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)
1451/// Replaces all newline sequences in the current string with <see cref="Environment.NewLine"/>. 1455/// with <see cref="Environment.NewLine"/>. 1471/// <see cref="Environment.NewLine"/> as the <em>replacementText</em> parameter. 1475public string ReplaceLineEndings() => ReplaceLineEndings(Environment.NewLineConst);
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (2)
862public StringBuilder AppendLine() => Append(Environment.NewLine); 867return 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)
749registrations.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; 807n.Registrations.ThreadIDExecutingCallbacks = Environment.CurrentManagedThreadId; 810registrations.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 (1)
197SpinCount = Environment.IsSingleProcessor ? DEFAULT_SPIN_SP : spinCount;
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 (4)
49int currentTimeMs = Environment.TickCount; 55currentTimeMs = Environment.TickCount; 186uint delay = (uint)(Environment.TickCount - threadPoolInstance._separated.lastDequeueTime); 248Environment.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)
143threadPoolInstance._separated.lastDequeueTime = Environment.TickCount; 166if (!Environment.IsSingleProcessor)
src\libraries\System.Private.CoreLib\src\System\Threading\ProcessorIdCache.cs (1)
34currentProcessorId = 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) 1567!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\SpinLock.cs (3)
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 (3)
88internal static readonly int SpinCountforSpinBeforeWait = Environment.IsSingleProcessor ? 1 : 35; 116public bool NextSpinWillYield => _count >= YieldThreshold || Environment.IsSingleProcessor; 174Environment.IsSingleProcessor)
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)
3059uint startTimeTicks = infiniteWait ? 0 : (uint)Environment.TickCount; 3106uint 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 (6)
398Environment.ProcessorCount <= 32 ? 0 : 399(Environment.ProcessorCount + (ProcessorsPerAssignableWorkItemQueue - 1)) / ProcessorsPerAssignableWorkItemQueue; 1061int startTickCount = Environment.TickCount; 1136int currentTickCount = Environment.TickCount; 1396int startTimeMs = Environment.TickCount; 1410(uint)(Environment.TickCount - startTimeMs) >= ThreadPoolWorkQueue.DispatchQuantumMs / 2 ||
src\libraries\System.Private.CoreLib\src\System\Threading\TimeoutHelper.cs (4)
9/// A helper class to capture a start time using <see cref="Environment.TickCount"/> as a time in milliseconds. 15/// Returns <see cref="Environment.TickCount"/> as a start time in milliseconds as a <see cref="uint"/>. 16/// <see cref="Environment.TickCount"/> rolls over from positive to negative every ~25 days, then ~25 days to back to positive again. 21return (uint)Environment.TickCount;
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)
216string? result = Environment.GetEnvironmentVariable(TimeZoneEnvironmentVariable); 593string? 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)
595errorMessage.AppendFormat("{0}\"{1}\" ", Environment.NewLine, conflictingType.AssemblyQualifiedName);
System.Private.Windows.Core (4)
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.Windows.GdiPlus (1)
Windows\Win32\Graphics\GdiPlus\GdiplusStartupInputEx.cs (1)
10OperatingSystem os = Environment.OSVersion;
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)
593err += $"{Environment.NewLine}{Dump(src)}{Environment.NewLine}{Dump(dest)}";
System\Xml\Serialization\XmlSerializationWriter.cs (4)
2408if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc!.Name) + Environment.StackTrace); 2987if (methodName == null) throw new InvalidOperationException("derived from " + mapping.TypeDesc!.FullName + ", " + SR.Format(SR.XmlInternalErrorMethod, derived.TypeDesc.Name) + Environment.StackTrace); 3026if (methodName == null) throw new InvalidOperationException(SR.Format(SR.XmlInternalErrorMethod, mapping.TypeDesc.Name) + Environment.StackTrace); 4113if (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)
178[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)
365_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)
1982if (Environment.Is64BitProcess) 2089if (Environment.Is64BitProcess) 2237if (Environment.Is64BitProcess) 2321if (Environment.Is64BitProcess) 5002if (Environment.Is64BitProcess && (value._bits.Length >= 2)) 5183if (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)
53string? 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)
370string 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.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)
762/// The default is the value of <see cref="Environment.NewLine"/>. 777return _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)
25private 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)
449if (!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 (31)
System\Resources\AssemblyNamesTypeResolutionService.cs (2)
16private static readonly string s_dotNetPath = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles") ?? string.Empty, "dotnet\\shared"); 17private static readonly string s_dotNetPathX86 = Path.Combine(Environment.GetEnvironmentVariable("ProgramFiles(x86)") ?? string.Empty, "dotnet\\shared");
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)
158=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)); 429=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)); 626=> GetDataPath(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); 1278string[] arguments = Environment.GetCommandLineArgs();
System\Windows\Forms\Application.ThreadContext.cs (3)
117Debug.WriteLine(CoreSwitches.PerfTrack.Enabled, Environment.StackTrace); 192Debug.WriteLine(CoreSwitches.PerfTrack.Enabled, Environment.StackTrace); 633Environment.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)
617Text = string.Join(Environment.NewLine, value);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (1)
22_callingStack = Environment.StackTrace;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
615string mshtmlPath = Path.Combine(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)
Analyzers\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)
754snapLineInfo = string.Join(Environment.NewLine, _testHook_RecentSnapLines) + Environment.NewLine;
System\Windows\Forms\Design\ControlDesigner.cs (1)
2485stack = 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)
83new(ExpectedIconNamesString.Split(Environment.NewLine).Where(item => !item.EndsWith(".bmp", StringComparison.Ordinal))); 86new(ExpectedBitmapNamesString.Split(Environment.NewLine)); 134string[] expected = $"{ExpectedIconNamesString}{Environment.NewLine}{ExpectedBitmapNamesString}{Environment.NewLine}{ExpectedResourceNames}".Split(Environment.NewLine);
System.Windows.Forms.Primitives (3)
System\Windows\Forms\Automation\UiaTextRange.cs (1)
789&& (text.Substring(lineStartIndex, lineTextLength) == Environment.NewLine
System\Windows\Forms\ObjectCache.cs (1)
19cacheSpace = Environment.Is64BitProcess ? 64 : 32;
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.Combine(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 (84)
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewSubItem.ListViewSubItemAccessibleObjectTests.cs (1)
863Assert.Equal(Environment.ProcessId, actual);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (1)
27Assert.Equal(Environment.ProcessId, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ProcessIdPropertyId));
System\Windows\Forms\AccessibleObjects\TreeViewLabelEditAccessibleObjectTests.cs (1)
26Assert.Equal(Environment.ProcessId, (int)accessibilityObject.GetPropertyValue(UIA_PROPERTY_ID.UIA_ProcessIdPropertyId));
System\Windows\Forms\EmbeddedResourceTests.cs (5)
198public static TheoryData<string> ExpectedIconNames() => new(ExpectedIconNamesString.Split(Environment.NewLine)); 227public static TheoryData<string> ExpectedCursorNames() => new(ExpectedCursorNamesString.Split(Environment.NewLine)); 254string allNames = $"{ExpectedIconNamesString}{Environment.NewLine}{ExpectedCursorNamesString}{Environment.NewLine}{ExpectedResourceNames}"; 255string[] expected = allNames.Split(Environment.NewLine);
System\Windows\Forms\FolderBrowserDialogTests.cs (6)
16Assert.Equal(Environment.SpecialFolder.Desktop, dialog.RootFolder); 124[InlineData(Environment.SpecialFolder.Desktop)] 125[InlineData(Environment.SpecialFolder.StartMenu)] 126public void FolderBrowserDialog_RootFolder_Set_GetReturnsExpected(Environment.SpecialFolder value) 277RootFolder = Environment.SpecialFolder.CommonAdminTools, 294Assert.Equal(Environment.SpecialFolder.Desktop, dialog.RootFolder);
System\Windows\Forms\HtmlElementTests.cs (12)
540Assert.Equal($"InnerText{Environment.NewLine}MoreText", element.InnerText); 821Assert.Equal($"{Environment.NewLine}<DIV id=id></DIV>", element.OuterHtml); 836Assert.Equal($"{Environment.NewLine}<DIV id=id><P>OuterText</P></DIV>", element.OuterHtml); 841yield return new object[] { null, $"{Environment.NewLine}<DIV id=id></DIV>" }; 842yield return new object[] { "", $"{Environment.NewLine}<DIV id=id></DIV>" }; 843yield return new object[] { "OuterText", $"{Environment.NewLine}<DIV id=id>OuterText</DIV>" }; 844yield return new object[] { "<p>OuterText</p>", $"{Environment.NewLine}<DIV id=id><P>OuterText</P></DIV>" }; 872yield return new object[] { null, $"{Environment.NewLine}<DIV id=id></DIV>" }; 873yield return new object[] { "", $"{Environment.NewLine}<DIV id=id></DIV>" }; 874yield return new object[] { "OuterText", $"{Environment.NewLine}<DIV id=id></DIV>" }; 875yield return new object[] { "<p>OuterText</p>", $"{Environment.NewLine}<DIV id=id></DIV>" }; 952Assert.Equal($"OuterText{Environment.NewLine}MoreText", element.OuterText);
System\Windows\Forms\SpecialFolderEnumConverterTests.cs (56)
17Assert.Equal(Environment.SpecialFolder.CommonDocuments, converter.ConvertFrom("CommonDocuments")); 24var expected = new Environment.SpecialFolder[] 26Environment.SpecialFolder.AdminTools, 27Environment.SpecialFolder.ApplicationData, 28Environment.SpecialFolder.CDBurning, 29Environment.SpecialFolder.CommonAdminTools, 30Environment.SpecialFolder.CommonApplicationData, 31Environment.SpecialFolder.CommonDesktopDirectory, 32Environment.SpecialFolder.CommonDocuments, 33Environment.SpecialFolder.CommonMusic, 34Environment.SpecialFolder.CommonOemLinks, 35Environment.SpecialFolder.CommonPictures, 36Environment.SpecialFolder.CommonProgramFiles, 37Environment.SpecialFolder.CommonProgramFilesX86, 38Environment.SpecialFolder.CommonPrograms, 39Environment.SpecialFolder.CommonStartMenu, 40Environment.SpecialFolder.CommonStartup, 41Environment.SpecialFolder.CommonTemplates, 42Environment.SpecialFolder.CommonVideos, 43Environment.SpecialFolder.Cookies, 44Environment.SpecialFolder.Desktop, 45Environment.SpecialFolder.DesktopDirectory, 46Environment.SpecialFolder.Favorites, 47Environment.SpecialFolder.Fonts, 48Environment.SpecialFolder.History, 49Environment.SpecialFolder.InternetCache, 50Environment.SpecialFolder.LocalApplicationData, 51Environment.SpecialFolder.LocalizedResources, 52Environment.SpecialFolder.MyComputer, 53Environment.SpecialFolder.MyDocuments, 54Environment.SpecialFolder.MyMusic, 55Environment.SpecialFolder.MyPictures, 56Environment.SpecialFolder.MyVideos, 57Environment.SpecialFolder.NetworkShortcuts, 58Environment.SpecialFolder.PrinterShortcuts, 59Environment.SpecialFolder.ProgramFiles, 60Environment.SpecialFolder.ProgramFilesX86, 61Environment.SpecialFolder.Programs, 62Environment.SpecialFolder.Recent, 63Environment.SpecialFolder.Resources, 64Environment.SpecialFolder.SendTo, 65Environment.SpecialFolder.StartMenu, 66Environment.SpecialFolder.Startup, 67Environment.SpecialFolder.System, 68Environment.SpecialFolder.SystemX86, 69Environment.SpecialFolder.Templates, 70Environment.SpecialFolder.UserProfile, 71Environment.SpecialFolder.Windows 73Assert.Equal(expected, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 78.Setup(p => p.GetReflectionType(typeof(Environment.SpecialFolder), null)) 81TypeDescriptor.AddProvider(mockProvider.Object, typeof(Environment.SpecialFolder)); 82Assert.Equal(new Environment.SpecialFolder[] { Environment.SpecialFolder.Personal }, converter.GetStandardValues(null).Cast<Environment.SpecialFolder>()); 83TypeDescriptor.RemoveProvider(mockProvider.Object, typeof(Environment.SpecialFolder)); 97return (TypeConverter)Activator.CreateInstance(descriptor.Converter.GetType(), new Type[] { typeof(Environment.SpecialFolder) });
System\Windows\Forms\SystemInformationTests.cs (1)
727Assert.Equal(Environment.UserDomainName, domainName);
System\Windows\Forms\WindowsFormsSynchronizationContextTests.cs (1)
157context.Send(_ => { stackTrace = Environment.StackTrace; }, null);
System.Windows.Forms.UI.IntegrationTests (2)
Infra\DataCollectionService.cs (1)
248if (Environment.GetEnvironmentVariable("XUNIT_LOGS") is { Length: > 0 } baseLogDirectory)
Infra\SendInput.cs (1)
89if (PInvoke.GetWindowThreadProcessId(window, out uint processId) == 0 || processId != Environment.ProcessId)
System.Xaml (1)
System\Xaml\XamlSchemaContext.cs (1)
76if (_assemblyLoadHandler is not null && !Environment.HasShutdownStarted)
SystemdTestApp (2)
Startup.cs (2)
29+ $"{Environment.NewLine}" 32var response = $"hello, world{Environment.NewLine}";
TagHelpersWebSite (5)
Components\DanViewComponent.cs (1)
17.Replace(Environment.NewLine, "<br>")
TagHelpers\WebsiteInformationTagHelper.cs (4)
19"<p><strong>Version:</strong> {0}</p>" + Environment.NewLine + 20"<p><strong>Copyright Year:</strong> {1}</p>" + Environment.NewLine + 21"<p><strong>Approved:</strong> {2}</p>" + Environment.NewLine + 22"<p><strong>Number of tags to show:</strong> {3}</p>" + Environment.NewLine,
Templates.Blazor.Tests (39)
BlazorTemplateTest.cs (1)
33Environment.SetEnvironmentVariable("EnableDefaultScopedCssItems", "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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
52var environmentOverride = Environment 150!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 164var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 225var 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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
52var environmentOverride = Environment 150!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 164var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 225var 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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
52var environmentOverride = Environment 150!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 164var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 225var 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)
854return 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))) 82var sslCertDirString = Environment.GetEnvironmentVariable(OpenSslCertificateDirectoryVariableName); 117var nssDbs = GetNssDbs(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)); 213var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); 379var homeDirectory = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)!; 508var searchPath = Environment.GetEnvironmentVariable("PATH"); 663var @override = Environment.GetEnvironmentVariable(OpenSslCertDirectoryOverrideVariableName); 689var nssDbOverride = Environment.GetEnvironmentVariable(NssDbOverrideVariableName); 736Log.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)
52var environmentOverride = Environment 150!string.Equals(Environment.GetEnvironmentVariable("E2E_TEST_VISIBLE"), "true", StringComparison.OrdinalIgnoreCase)) 164var binaryLocation = Environment.GetEnvironmentVariable("TEST_CHROME_BINARY"); 225var 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");
TestProject.IntegrationServiceA (2)
Program.cs (2)
7string? skipResourcesValue = Environment.GetEnvironmentVariable("SKIP_RESOURCES"); 35app.MapGet("/pid", () => Environment.ProcessId);
TestProject.ServiceA (1)
Program.cs (1)
11app.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);
UIAutomationClient (5)
MS\Internal\Automation\HwndProxyElementProvider.cs (3)
1631long dwTicks = (long)Environment.TickCount; 1634while (InMenuMode() && ((long)Environment.TickCount - dwTicks) < MenuTimeOut) 1764if (Environment.OSVersion.Version.Major >= 6)
MS\Internal\Automation\Misc.cs (1)
523&& System.Environment.OSVersion.Version.Major >= 6)
MS\Win32\UnsafeNativeMethods.cs (1)
176if (System.Environment.OSVersion.Version.Major >= 6)
UIAutomationClientSideProviders (32)
MS\Internal\AutomationProxies\Accessible.cs (2)
163if(Environment.OSVersion.Version.Major >= 6) 164wParam = new IntPtr(Environment.ProcessId);
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (1)
23if (Environment.OSVersion.Version.Major >= 5)
MS\Internal\AutomationProxies\CommonXSendMessage.cs (7)
626if (Environment.OSVersion.Version.Major == 5) 638if (Environment.OSVersion.Version.Major == 5) 650if (Environment.OSVersion.Version.Major == 5) 1487if (Environment.OSVersion.Version.Major > 5 || (Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor == 1)) 1509else if (Environment.OSVersion.Version.Major == 5)
MS\Internal\AutomationProxies\Misc.cs (8)
110long dwTicks = (long)Environment.TickCount; 113while (InMenuMode() && ((long)Environment.TickCount - dwTicks) < MenuTimeOut) 291bool result = (System.Environment.OSVersion.Version.Major >= 6) ? UnsafeNativeMethods.GetPhysicalCursorPos(ref pt) 1028&& System.Environment.OSVersion.Version.Major >= 6) 1218if (System.Environment.OSVersion.Version.Major >= 6) 1877if (Environment.OSVersion.Version.Major >= 6 && commonControlVersion >= 6) 1991Debug.Assert(System.Environment.OSVersion.Version.Major < 6); 2062Debug.Assert(System.Environment.OSVersion.Version.Major >= 6);
MS\Internal\AutomationProxies\SafeProcessHandle.cs (1)
24processId = (uint)Environment.ProcessId;
MS\Internal\AutomationProxies\WindowsButton.cs (3)
189if (Environment.OSVersion.Version.Major < 6) 289if (idEvent == InvokePattern.InvokedEvent && Environment.OSVersion.Version.Major >= 6) 559if (Environment.OSVersion.Version.Major >= 6)
MS\Internal\AutomationProxies\WindowsListView.cs (1)
911if (Environment.OSVersion.Version.Major < 6)
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
816if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd))) 1260if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_hwnd)))
MS\Internal\AutomationProxies\WindowsScrollBar.cs (2)
163if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(_parent._hwnd))) 587if ((Environment.OSVersion.Version.Major < 6) && (_sbFlag == NativeMethods.SB_HORZ) && (Misc.IsControlRTL(_parent._hwnd)))
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (2)
236if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(parent._parent._hwnd))) 417if ((Environment.OSVersion.Version.Major < 6) && (Misc.IsLayoutRTL(hwnd)))
MS\Internal\AutomationProxies\WindowsTooltip.cs (1)
209if (System.Environment.OSVersion.Version.Major >= 6)
MS\Internal\AutomationProxies\WindowsTreeView.cs (1)
817if (_nativeAcc == null && System.Environment.OSVersion.Version.Major >= 6 && Misc.IsWindowInGivenProcess(_hwnd, "explorer"))
MS\Win32\UnsafeNativeMethods.cs (1)
315if (System.Environment.OSVersion.Version.Major >= 6)
vbc (11)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (3)
119loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 152var threadId = Environment.CurrentManagedThreadId; 154string output = prefix + message + Environment.NewLine;
src\Compilers\Shared\BuildClient.cs (1)
154var libDirectory = Environment.GetEnvironmentVariable("LIB");
src\Compilers\Shared\BuildServerConnection.cs (3)
207var originalThreadId = Environment.CurrentManagedThreadId; 268var releaseThreadId = Environment.CurrentManagedThreadId; 553var userName = Environment.UserName;
src\Compilers\Shared\ExitingTraceListener.cs (1)
58Environment.FailFast(message);
src\Compilers\Shared\RuntimeHostInfo.cs (2)
61if (Environment.GetEnvironmentVariable(DotNetHostPathEnvironmentName) is string pathToDotNet) 70var path = Environment.GetEnvironmentVariable("PATH") ?? "";
src\Compilers\Shared\Vbc.cs (1)
18: base(VisualBasicCommandLineParser.Default, responseFile, args, buildPaths, Environment.GetEnvironmentVariable("LIB"), analyzerLoader)
VBCSCompiler (10)
src\Compilers\Core\CommandLine\CompilerServerLogger.cs (3)
119loggingFilePath = Environment.GetEnvironmentVariable(EnvironmentVariableName); 152var threadId = Environment.CurrentManagedThreadId; 154string output = prefix + message + Environment.NewLine;
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 (3)
207var originalThreadId = Environment.CurrentManagedThreadId; 268var releaseThreadId = Environment.CurrentManagedThreadId; 553var userName = Environment.UserName;
src\Compilers\Shared\ExitingTraceListener.cs (1)
58Environment.FailFast(message);
VBCSCompiler.UnitTests (5)
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;
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)
26Environment.Exit(-1); 29Environment.Exit(0);
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)
49 foreach (var line in stack.Split(new[] { Environment.NewLine }, StringSplitOptions.None)) 56 return string.Join(Environment.NewLine, results.ToArray()); 92 Environment.NewLine, 94 .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)
45 Environment.NewLine, 47 Environment.NewLine,
Sdk\Exceptions\IsTypeException.cs (2)
47 Environment.NewLine, 49 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");