37 references to UpdateSourceFile
dotnet-watch.Tests (37)
Browser\BrowserTests.cs (3)
56UpdateSourceFile(homePagePath, src => src.Replace("/* member placeholder */", """ 85UpdateSourceFile(homePagePath, src => src.Replace("public virtual int F() => 1;", "/* member placeholder */")); 102UpdateSourceFile(homePagePath, src => src.Replace("/* member placeholder */", "public int F() => 1;"));
HotReload\ApplyDeltaTests.cs (23)
86UpdateSourceFile( 145UpdateSourceFile(buildFilePath, src => src.Replace(symbolName, "")); 187UpdateSourceFile( 324UpdateSourceFile(programPath, content => content.Replace(""" 333UpdateSourceFile(projectPath, content => content.Replace(""" 377UpdateSourceFile(projectPath, content => content.Replace(""" 427UpdateSourceFile(programPath, src => src.Replace("/* member placeholder */", "public virtual void F() {}")); 438UpdateSourceFile(programPath, src => src.Replace("public virtual void F() {}", "public virtual void F() { Console.WriteLine(1); }")); 486UpdateSourceFile(programPath, src => src.Replace("Action<int>", "Action<byte>")); 515UpdateSourceFile(programPath, src => src.Replace("/* member placeholder */", "public virtual void F() {}")); 532UpdateSourceFile(programPath, src => src.Replace("public virtual void F() {}", "")); 570UpdateSourceFile(programPath, src => src.Replace("Started", "<Updated>")); 582UpdateSourceFile(programPath, src => src.Replace("/* member placeholder */", "public void F() {}")); 623UpdateSourceFile(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "<Updated>")); 656UpdateSourceFile(sourcePath, content => content.Replace("Waiting", "<Updated>")); 661UpdateSourceFile(sourcePath, content => content.Replace("<Updated>", "<Updated2>")); 789UpdateSourceFile(programPath, src => src.Replace("// <metadata update handler placeholder>", """ 822UpdateSourceFile(programPath, src => src.Replace("// <metadata update handler placeholder>", """ 1005UpdateSourceFile(cssPath, content => content.Replace("background-color: white;", "background-color: red;")); 1042UpdateSourceFile(razorPath, content => content.Replace("Hello, world!", "Updated")); 1053UpdateSourceFile(cssPath, content => content.Replace("background-color: white;", "background-color: red;")); 1339UpdateSourceFile(webSourcePath, src => src.Replace("/* top-level placeholder */", "builder.Services.AddRazorComponents();")); 1354UpdateSourceFile(webSourcePath, src => src.Replace("Hello world!", "<Updated>"));
HotReload\RuntimeProcessLauncherTests.cs (9)
470UpdateSourceFile(hostProgram, content => content.Replace("Waiting", "<Updated>")); 479UpdateSourceFile(hostProgram, content => content.Replace("Started", "<Updated>")); 682UpdateSourceFile(programPath, src => src.Replace("""Console.WriteLine(".");""", """Console.WriteLine(typeof(XDocument));""")); 683UpdateSourceFile(projectPath, src => src.Replace("<!-- items placeholder -->", """<Using Include="System.Xml.Linq"/>""")); 712UpdateSourceFile(appFile, code => code.Replace("Lib.Print();", "// Lib.Print();")); 740UpdateSourceFile(appProjFile, src => src.Replace(""" 748UpdateSourceFile(appFile, code => code.Replace("// Lib.Print();", "Lib.Print();")); 799UpdateSourceFile(projFilePath, source => source.Replace(""" 805UpdateSourceFile(programFilePath, source => source.Replace("Console.WriteLine(\".\");", "Console.WriteLine(typeof(Newtonsoft.Json.Linq.JToken));"));
TestUtilities\DotNetWatchTestBase.cs (1)
58=> UpdateSourceFile(path, content => content);
Watch\GlobbingAppTests.cs (1)
30UpdateSourceFile(Path.Combine(projectDir, "include", "Foo.cs"), src => src);