150 references to ReplaceLineEndings
aspire (6)
Agents\AspireSkills\AspireSkillsBundleProvider.cs (1)
360var normalizedContent = content.ReplaceLineEndings("\n");
Commands\AgentInitCommand.cs (2)
870if (string.Equals(existingContent.ReplaceLineEndings("\n"), skillFile.Content.ReplaceLineEndings("\n"), StringComparison.Ordinal))
Completions\CompletionScripts.cs (1)
295return script.ReplaceLineEndings("\n") + "\n";
NuGet\NuGetClient.cs (1)
1246foreach (var line in text.ReplaceLineEndings("\n").Split('\n'))
Projects\RepositoryToolUpdater.cs (1)
212var content = manifest.Content.ToJsonString(s_jsonOptions).ReplaceLineEndings(newLine) + newLine;
aspire-tray (1)
src\Aspire.Tray\Common\AppHostPresentation.cs (1)
63private static string ToSingleLine(string value) => value.ReplaceLineEndings(" ").Replace('\t', ' ');
Aspire.Acquisition.Tests (5)
Scripts\Common\ScriptFunctionCommand.cs (1)
119File.WriteAllText(tempScript, wrapperContent.ReplaceLineEndings("\n"));
Scripts\CompletionScriptTests.cs (2)
532File.WriteAllText(profile, File.ReadAllText(profile).ReplaceLineEndings("\r\n")); 1019""" + "\n").ReplaceLineEndings("\n"));
Scripts\ReleaseScriptFunctionTests.cs (1)
510""").ReplaceLineEndings("\n"));
Scripts\ReleaseScriptPSFunctionTests.cs (1)
541await File.WriteAllTextAsync(cliPath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n"));
Aspire.Cli.EndToEnd.Tests (5)
CompletionTests.cs (1)
96""" + "\n").ReplaceLineEndings("\n"));
DoctorCommandTests.cs (1)
72script.ReplaceLineEndings("\n") + "\n",
RepositoryToolUpdateTests.cs (1)
132PackageManagerWrapper.ReplaceLineEndings("\n") + "\n",
TypeScriptBlazorGatewayTests.cs (1)
134await File.WriteAllTextAsync(verificationScriptPath, verificationScript.ReplaceLineEndings("\n"));
TypeScriptPolyglotTests.cs (1)
300""".ReplaceLineEndings(" "));
Aspire.Cli.Tests (19)
Agents\AgentTelemetryCatalogTests.cs (1)
45var catalog = AgentTelemetryCatalog.Parse(ParseManifest(Manifest.ReplaceLineEndings(newline)), Script);
Agents\CommonAgentApplicatorsTests.cs (1)
135var normalizedContent = content.ReplaceLineEndings("\n");
Commands\CompletionScriptTests.cs (9)
105""" + "\n").ReplaceLineEndings("\n")); 119var output = await RunShellAsync("bash", ["--noprofile", "--norc", "-c", script.ReplaceLineEndings("\n")], 166var output = await RunShellAsync("bash", ["--noprofile", "--norc", "-c", script.ReplaceLineEndings("\n")], 203var expected = await RunShellAsync("bash", ["--noprofile", "--norc", "-c", script.ReplaceLineEndings("\n")], 234var output = await RunShellAsync("fish", ["--no-config", "-c", script.ReplaceLineEndings("\n")], 237Assert.Equal("2\n2\n", output.ReplaceLineEndings("\n")); 252var output = await RunShellAsync("zsh", ["-f", "-c", script.ReplaceLineEndings("\n")], 291var output = await RunShellAsync("zsh", ["-f", "-c", script.ReplaceLineEndings("\n")], 301Assert.Equal("--\nDebug\n", output.ReplaceLineEndings("\n"));
Commands\InitCommandTests.cs (1)
902await File.WriteAllTextAsync(configPath, "{\n \"channel\": \"stable\"\n}\n".ReplaceLineEndings(LineEndingAssert.NonOsNewLine));
Commands\Sdk\SdkExportCommandTests.cs (1)
418""".ReplaceLineEndings("\r\n"));
Configuration\ConfigurationServiceTests.cs (2)
290var (service, settingsFilePath) = CreateService(workspace, "{\n \"appHost\": {\n \"path\": \"MyApp.csproj\"\n }\n}\n".ReplaceLineEndings(LineEndingAssert.NonOsNewLine)); 315var (service, settingsFilePath) = CreateService(workspace, "{\n \"channel\": \"daily\",\n \"appHost\": {\n \"path\": \"MyApp.csproj\"\n }\n}\n".ReplaceLineEndings(LineEndingAssert.NonOsNewLine));
Templating\CliTemplateFactoryConfigLineEndingTests.cs (1)
38content => content.ReplaceLineEndings(LineEndingAssert.NonOsNewLine),
TestServices\ProcessTestHelpers.cs (2)
15File.WriteAllText(path, windowsScript.ReplaceLineEndings("\r\n") + "\r\n"); 19File.WriteAllText(path, "#!/bin/sh\n" + unixScript.ReplaceLineEndings("\n") + "\n");
Utils\LineEndingAssert.cs (1)
21Assert.Equal(content.ReplaceLineEndings(Environment.NewLine), content);
Aspire.Hosting.Azure.ContainerRegistry (1)
AzureContainerRegistryExtensions.cs (1)
312""".ReplaceLineEndings("\n");
Aspire.Hosting.CodeGeneration.Go.Tests (5)
AtsGoCodeGeneratorTests.cs (4)
1539var aspireGo = files["aspire.go"].ReplaceLineEndings("\n"); 1866var aspireGo = _generator.GenerateDistributedApplication(atsContext)["aspire.go"].ReplaceLineEndings("\n"); 1900var aspireGo = files["aspire.go"].ReplaceLineEndings("\n"); 1914var aspireGo = _generator.GenerateDistributedApplication(atsContext)["aspire.go"].ReplaceLineEndings("\n");
GoScaffoldTests.cs (1)
218var line = goMod.ReplaceLineEndings("\n")
Aspire.Hosting.CodeGeneration.Python.Tests (1)
AtsPythonCodeGeneratorTests.cs (1)
1158var aspirePy = files["aspire_app.py"].ReplaceLineEndings("\n");
Aspire.Hosting.CodeGeneration.TypeScript (1)
TypeScriptApiModel.cs (1)
225init => _content = value.ReplaceLineEndings("\n");
Aspire.Hosting.CodeGeneration.TypeScript.Tests (6)
AtsTypeScriptCodeGeneratorTests.cs (6)
258aspireTs.ReplaceLineEndings("\n"), 332var source = _generator.GenerateDistributedApplication(context)["aspire.mts"].ReplaceLineEndings("\n"); 3065""".ReplaceLineEndings("\n"); 3070_generator.GenerateDistributedApplication(context)["aspire.mts"].ReplaceLineEndings("\n"), 3229""".ReplaceLineEndings("\n"), 3236""".ReplaceLineEndings("\n"),
Aspire.Hosting.JavaScript.Tests (3)
AddDenoAppTests.cs (3)
1450exception.Message.ReplaceLineEndings("\n")); 2019exception.Message.ReplaceLineEndings("\n")); 2102exception.Message.ReplaceLineEndings("\n"));
Aspire.Hosting.Native.Core.Tests (1)
NativeCliControlTests.cs (1)
48spec["migrationFiles"]![name] = content!.GetValue<string>().ReplaceLineEndings("\n");
Aspire.Hosting.RemoteHost (1)
Ats\PolyglotCapabilityInvocationException.cs (1)
541message = message.ReplaceLineEndings(" ");
Aspire.Hosting.Sdk.Tests (9)
AppHostSdkTargetsTests.cs (9)
1676await File.WriteAllTextAsync(aspirePath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n")); 1738""").ReplaceLineEndings("\n")); 1786""").ReplaceLineEndings("\n")); 1819""").ReplaceLineEndings("\n")); 1884""").ReplaceLineEndings("\n")); 1918""").ReplaceLineEndings("\n")); 1948""").ReplaceLineEndings("\n")); 1986""").ReplaceLineEndings("\n")); 2017""").ReplaceLineEndings("\n"));
Aspire.Hosting.Tests (19)
ApplicationModel\Docker\DockerfileBuilderEdgeCasesTests.cs (5)
81""".ReplaceLineEndings("\n"); 106""".ReplaceLineEndings("\n"); 138""".ReplaceLineEndings("\n"); 176""".ReplaceLineEndings("\n"); 192""".ReplaceLineEndings("\n");
ApplicationModel\Docker\DockerfileBuilderIntegrationTests.cs (2)
54""".ReplaceLineEndings("\n"); 132""".ReplaceLineEndings("\n");
ApplicationModel\Docker\DockerfileBuilderTests.cs (2)
136""".ReplaceLineEndings("\n"); 182""".ReplaceLineEndings("\n");
ApplicationModel\Docker\DockerfileStageTests.cs (7)
331""".ReplaceLineEndings("\n"); 367""".ReplaceLineEndings("\n"); 403""".ReplaceLineEndings("\n"); 432""".ReplaceLineEndings("\n"); 476""".ReplaceLineEndings("\n"); 536""".ReplaceLineEndings("\n"); 567""".ReplaceLineEndings("\n");
MSBuildTests.cs (3)
1055File.WriteAllText(cliPath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n")); 1081File.WriteAllText(cliPath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n")); 1107File.WriteAllText(cliPath, contents.ReplaceLineEndings(OperatingSystem.IsWindows() ? "\r\n" : "\n"));
Aspire.Tray.Tests (1)
src\Aspire.Tray\Common\AppHostPresentation.cs (1)
63private static string ToSingleLine(string value) => value.ReplaceLineEndings(" ").Replace('\t', ' ');
ConfigurationSchemaGenerator (1)
ConfigSchemaGenerator.cs (1)
36schema = schema.ReplaceLineEndings("\n");
dotnet-aot (4)
parent\dotnet\CliSchema.cs (4)
115description: command.Description?.ReplaceLineEndings("\n"), 178subCommand.Description?.ReplaceLineEndings("\n"), 187option.Description?.ReplaceLineEndings("\n"), 216argument.Description?.ReplaceLineEndings("\n"),
GenerateTemplateManifest (1)
ComponentManifest.cs (1)
99return manifest.ToJsonString(new JsonSerializerOptions { WriteIndented = true }).ReplaceLineEndings("\n") + "\n";
Infrastructure.Tests (56)
PowerShellScripts\ScanTestPartitionsFromSourceGuardTests.cs (1)
81.ReplaceLineEndings(" ");
WorkflowScripts\AnalyzeCiFailureWorkflowTests.cs (21)
1713""".ReplaceLineEndings("\n") + "\n", 1714(await File.ReadAllTextAsync(bodyPath)).ReplaceLineEndings("\n")); 1795""".ReplaceLineEndings("\n") + "\n", 1796(await File.ReadAllTextAsync(bodyPath)).ReplaceLineEndings("\n")); 3961var outputLines = result.Output.ReplaceLineEndings("\n").Split('\n'); 4098""".ReplaceLineEndings("\n") + "\n", 4099(await File.ReadAllTextAsync(bodyPath)).ReplaceLineEndings("\n")); 4185""".ReplaceLineEndings("\r\n")); 4246""".ReplaceLineEndings("\r\n")); 4322""".ReplaceLineEndings("\n") + "\n", 4323(await File.ReadAllTextAsync(outputPath)).ReplaceLineEndings("\n")); 4345""".ReplaceLineEndings("\r\n")); 4375""".ReplaceLineEndings("\n") + "\n", 4376(await File.ReadAllTextAsync(outputPath)).ReplaceLineEndings("\n")); 4402""".ReplaceLineEndings("\n")); 4442""".ReplaceLineEndings("\r\n")); 4468outputBody.ReplaceLineEndings("\n"), 4472outputBody.ReplaceLineEndings("\n"), 4476outputBody.ReplaceLineEndings("\n"), 4479outputBody.ReplaceLineEndings("\n").EndsWith( 4689=> output.ReplaceLineEndings("\n")
WorkflowScripts\AutoSecWorkflowTests.cs (23)
78result["stderr"]!.GetValue<string>().ReplaceLineEndings("\n")); 1096""".ReplaceLineEndings("\n") 1123output["body"] = PublicTextBody.ReplaceLineEndings("\n").Replace( 1385["patchFiles"] = new JsonObject { ["aw-auto-sec-security-updates.patch"] = PublicTextPatch.ReplaceLineEndings("\n") }, 1672var text = JsonNode.Parse(files[path]!.GetValue<string>())!.ToJsonString(new JsonSerializerOptions { WriteIndented = true }).ReplaceLineEndings("\n") + "\n"; 1680heads["extension/package-lock.json"] = head.ToJsonString(new JsonSerializerOptions { WriteIndented = true }).ReplaceLineEndings("\n") + "\n"; 3285var workflow = PublicationGuardFixture.ReplaceLineEndings(newline); 3321Assert.Equal("private-alert-123\n", unguarded["stdout"]!.GetValue<string>().ReplaceLineEndings("\n")); 3325var workflow = PublicationGuardFixture.ReplaceLineEndings("\n").Replace( 3370Assert.Equal("private-gateway\n", original["stdout"]!.GetValue<string>().ReplaceLineEndings("\n")); 3371Assert.Equal("private-gateway-error\n", original["stderr"]!.GetValue<string>().ReplaceLineEndings("\n")); 3373var workflow = PublicationGuardFixture.ReplaceLineEndings("\n").Replace( 3385Assert.Equal("::add-mask::fixture-gateway-id\n", quiet["stdout"]!.GetValue<string>().ReplaceLineEndings("\n")); 3399var workflow = PublicationGuardFixture.ReplaceLineEndings("\n"); 3401+ "\n" + terminal).ReplaceLineEndings(newline); 3424var workflow = PublicationGuardFixture.ReplaceLineEndings("\n"); 3429workflow = workflow[..workflow.IndexOf(" other_job:", StringComparison.Ordinal)].TrimEnd('\n').ReplaceLineEndings(newline); 3442var workflow = PublicationGuardFixture.ReplaceLineEndings("\n").Replace( 3453Assert.Equal("echo first\necho second\n", step.Children[new YamlScalarNode("run")].ToString().ReplaceLineEndings("\n")); 3464var workflow = PublicationGuardFixture.ReplaceLineEndings("\n"); 3472telemetry, StringComparison.Ordinal).ReplaceLineEndings(newline); 3510var workflow = PublicationGuardFixture.ReplaceLineEndings("\n"); 4732Assert.Equal(existing ? "preserved" : OperatingSystem.IsWindows() ? "created\nappend" : "created 600\nappend", result["stdout"]!.GetValue<string>().ReplaceLineEndings("\n"));
WorkflowScripts\ExtensionChangelogFinalizedWorkflowTests.cs (7)
65Assert.Equal("extension/CHANGELOG.md is finalized.\n", result.Output.ReplaceLineEndings("\n")); 84Assert.Equal("extension/CHANGELOG.md is finalized.\n", result.Output.ReplaceLineEndings("\n")); 103Assert.Equal("extension/CHANGELOG.md is finalized.\n", result.Output.ReplaceLineEndings("\n")); 124Assert.Equal("extension/CHANGELOG.md is finalized.\n", result.Output.ReplaceLineEndings("\n")); 149Assert.Equal("extension/CHANGELOG.md is finalized.\n", result.Output.ReplaceLineEndings("\n")); 249await File.WriteAllTextAsync(changelogPath, content.ReplaceLineEndings("\n")); 399await File.WriteAllTextAsync(fullPath, content.ReplaceLineEndings("\n"));
WorkflowScripts\ExtensionReleaseWorkflowTests.cs (4)
114var callLog = (await File.ReadAllTextAsync(fakeGh.CallLogPath)).ReplaceLineEndings("\n"); 221var bulletLines = output.ReplaceLineEndings("\n") 272var bulletLines = output.ReplaceLineEndings("\n") 292var bulletLines = output.ReplaceLineEndings("\n")
System.CommandLine.StaticCompletions (1)
shells\PowershellShellProvider.cs (1)
84private static string? SanitizeHelpDescription(Symbol s) => s.Description?.ReplaceLineEndings(" ").Replace("`", "``").Replace("'", "`'").Replace("\"", "`\"").Replace("$", "`$");
System.Private.CoreLib (2)
src\runtime\src\libraries\System.Private.CoreLib\src\System\String.Manipulation.cs (2)
1514/// This overload is equivalent to calling <see cref="ReplaceLineEndings(string)"/>, passing 1519public string ReplaceLineEndings() => ReplaceLineEndings(Environment.NewLineConst);
TypeScriptApiCompat (1)
AtsSurfaceParser.cs (1)
21foreach (var rawLine in content.ReplaceLineEndings("\n").Split('\n'))