58 instantiations of ReplaceInfo
dotnet-svcutil-lib.Tests (58)
FixupUtil.cs (58)
25new ReplaceInfo(@"\[\d+\.\d+\]", "$LOGENTRY$") { UseRegex = true }, 26new ReplaceInfo(@"\d+_\w+_\d+_\d+(_\d+)*", "9999_JAN_9_9_9") { UseRegex = true }, 27new ReplaceInfo(@"in \d+(\,\d+)* ms", "$TIME$") { UseRegex = true }, 28new ReplaceInfo(@"in \d+(\.\d+)* ms", "$TIME$") { UseRegex = true }, 29new ReplaceInfo(@"in \d+(\.\d+)* sec", "$TIME$") { UseRegex = true }, 30new ReplaceInfo(@"in \d+(\,\d+)* sec", "$TIME$") { UseRegex = true }, 31new ReplaceInfo(@"position \d+", "position NNN") { UseRegex = true }, 32new ReplaceInfo(@"line \d+", "line NNN") { UseRegex = true }, 33new ReplaceInfo(@"Elapsed (\d+\:)+\d+\.\d+", "Elapsed HH:MM:SS.ms") { UseRegex = true }, 34new ReplaceInfo(@"elapsed: \d+:\d+:(\d+.)+", "elapsed HH:MM:SS.ms") { UseRegex = true }, 35new ReplaceInfo(@"\d+\.\d+\.\d+(\.\d+)*(-\w+)*(\.\d+)*", "99.99.99") { UseRegex = true }, // new, valid version value to be able to compile projects, sample: 5.0.100-preview.7.20366.6 36new ReplaceInfo(@"targets\(\d+,\d+\)", "targets(NN, NN)") { UseRegex = true }, 37new ReplaceInfo(@"\[(.*.csproj?)\]", "[$ProjectFile$.csproj]") { UseRegex = true }, 38new ReplaceInfo(@"Found conflicts between different versions of (.*) that could not be resolved.", "Found conflicts between different versions of the same dependent assembly that could not be resolved.") { UseRegex = true }, 39new ReplaceInfo("Validation Error: Wildcard '(.*)' allows element '(.*)', and causes the content model to become ambiguous.", "Validation Error: Wildcard '$wildcard%' allows element '%element%', and causes the content model to become ambiguous.") { UseRegex = true }, 40new ReplaceInfo(@"\s*at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult\(\)", "") { UseRegex = true }, // Only shows in stack traces on debug builds. 41new ReplaceInfo(Path.GetTempPath(), "$TEMP$"), 42new ReplaceInfo(Path.GetTempPath().Replace("\\", "\\\\"), "$TEMP$"), 43new ReplaceInfo(Path.GetTempPath().Replace("\\", "/"), "$TEMP$"), 44new ReplaceInfo(Environment.GetEnvironmentVariable("USERPROFILE"), "$USERPROFILE$"), 45new ReplaceInfo("/root", "$USERPROFILE$"), 46new ReplaceInfo(@"targetFramework:\[netcoreapp\d+\.\d+\]", "targetFramework:[N.N]") { UseRegex = true }, 47new ReplaceInfo(@"""targetFramework"": ""netcoreapp\d+\.\d+""", "\"targetFramework\": \"N.N\"") { UseRegex = true }, //new 48new ReplaceInfo(@"<TargetFramework>netcoreapp\d+\.\d+</TargetFramework>", "<TargetFramework>N.N</TargetFramework>") { UseRegex = true }, //new 49new ReplaceInfo(@"""targetFramework"": ""net\d+\.\d+(-?)\w*""", "\"targetFramework\": \"N.N\"") { UseRegex = true }, //new 50new ReplaceInfo(@"<TargetFramework>net\d+\.\d+</TargetFramework>", "<TargetFramework>N.N</TargetFramework>") { UseRegex = true }, //new 51new ReplaceInfo(@"<PackageReference Include=""System\.ServiceModel\.\w+"" Version="".+"" />", @"<PackageReference Include=""System.ServiceModel.*"", Version=""N.N.N"">") { UseRegex = true }, //new 52new ReplaceInfo(@"<PackageReference Include=""System\.Web\.Services\.Description"" Version="".+"" />", @"<PackageReference Include=""System.Web.Services.Description"", Version=""N.N.N"">") { UseRegex = true } //new 60_replacements.Add(new ReplaceInfo($"{s_programFilesx64}/dotnet/sdk.*.targets", "$sdkTarget$") { UseRegex = true }); 64_replacements.Add(new ReplaceInfo(@"/usr/share/dotnet/sdk.*.targets", "$sdkTarget$") { UseRegex = true }); 68_replacements.Add(new ReplaceInfo(resultPathReplacement, "$resultPath$")); 69_replacements.Add(new ReplaceInfo(resultPathReplacement.Replace('\\', '/'), "$resultPath$")); 70_replacements.Add(new ReplaceInfo(resultPathReplacement.Replace("\\", "\\\\"), "$resultPath$")); 71_replacements.Add(new ReplaceInfo(@"$resultPath$\\TestResults\\TypeReuse\\TypeReuse20\\bin\\Debug\\netcoreapp2.0\\BinLib.dll", @"$resultPath$\TestResults\TypeReuse\TypeReuse20\bin\Debug\netcoreapp2.0\BinLib.dll")); 72_replacements.Add(new ReplaceInfo(@"$resultPath$\\TestResults\\TypeReuse\\TypeReuse20\\bin\\Debug\\netcoreapp2.0\\TypesLib.dll", @"$resultPath$\TestResults\TypeReuse\TypeReuse20\bin\Debug\netcoreapp2.0\TypesLib.dll")); 73_replacements.Add(new ReplaceInfo(testCasesPath, "$testCasesPath$")); 74_replacements.Add(new ReplaceInfo(testCasesPath.Replace('\\', '/'), "$testCasesPath$")); 75_replacements.Add(new ReplaceInfo(testCasesPath.Replace("\\", "\\\\"), "$testCasesPath$")); 76_replacements.Add(new ReplaceInfo(projectPath, "$projectPath$")); 77_replacements.Add(new ReplaceInfo(projectPath.Replace('\\', '/'), "$projectPath$")); 78_replacements.Add(new ReplaceInfo(projectPath.Replace("\\", "\\\\"), "$projectPath$")); 79_replacements.Add(new ReplaceInfo(repositoryRoot, "$repositoryRoot$")); 80_replacements.Add(new ReplaceInfo(repositoryRoot.Replace("\\", "/"), "$repositoryRoot$")); 81_replacements.Add(new ReplaceInfo(repositoryRoot.Replace("\\", "\\\\"), "$repositoryRoot$")); 82_replacements.Add(new ReplaceInfo("$repositoryRoot$\\bin\\Debug", "$binDir$")); 83_replacements.Add(new ReplaceInfo("$repositoryRoot$/bin/Debug", "$binDir$")); 84_replacements.Add(new ReplaceInfo("$repositoryRoot$\\bin\\Release", "$binDir$")); 85_replacements.Add(new ReplaceInfo("$repositoryRoot$/bin/Release", "$binDir$")); 86_replacements.Add(new ReplaceInfo(Environment.GetEnvironmentVariable("HOME"), "$USERPROFILE$")); 87_replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+/dotnet-svcutil-lib.dll", "DOTNET_VERSION/dotnet-svcutil-lib.dll") { UseRegex = true }); //for linux 88_replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows 89_replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+/any/dotnet-svcutil-lib.dll", "DOTNET_VERSION/any/dotnet-svcutil-lib.dll") { UseRegex = true }); //for linux 90_replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\any\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\any\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows 91_replacements.Add(new ReplaceInfo(@"Release\Shipping", @"RelType/ShipType")); 92_replacements.Add(new ReplaceInfo(@"Release\NonShipping", @"RelType/ShipType")); 93_replacements.Add(new ReplaceInfo(@"Debug\Shipping", @"RelType/ShipType")); 94_replacements.Add(new ReplaceInfo(@"Debug\NonShipping", @"RelType/ShipType")); 104replacements.Add(new ReplaceInfo("\\", "/"));
5 references to ReplaceInfo
dotnet-svcutil-lib.Tests (5)
FixupUtil.cs (5)
17private List<ReplaceInfo> _replacements; 22_replacements = new List<ReplaceInfo> 99var replacements = new List<ReplaceInfo>(_replacements); 118public string ReplaceText(string originalText, List<ReplaceInfo> replacements = null) 135foreach (ReplaceInfo replaceItem in replacements)