32 references to UpdateSourceFile
dotnet-watch.Tests (32)
HotReload\ApplyDeltaTests.cs (21)
86
UpdateSourceFile
(
145
UpdateSourceFile
(buildFilePath, src => src.Replace(symbolName, ""));
187
UpdateSourceFile
(
324
UpdateSourceFile
(programPath, content => content.Replace("""
333
UpdateSourceFile
(projectPath, content => content.Replace("""
377
UpdateSourceFile
(projectPath, content => content.Replace("""
427
UpdateSourceFile
(programPath, src => src.Replace("/* member placeholder */", "public virtual void F() {}"));
438
UpdateSourceFile
(programPath, src => src.Replace("public virtual void F() {}", "public virtual void F() { Console.WriteLine(1); }"));
457
UpdateSourceFile
(programPath, src => src.Replace("/* member placeholder */", "public virtual void F() {}"));
474
UpdateSourceFile
(programPath, src => src.Replace("public virtual void F() {}", ""));
512
UpdateSourceFile
(programPath, src => src.Replace("Started", "<Updated>"));
524
UpdateSourceFile
(programPath, src => src.Replace("/* member placeholder */", "public void F() {}"));
565
UpdateSourceFile
(Path.Combine(testAsset.Path, "Program.fs"), content => content.Replace("Hello World!", "<Updated>"));
598
UpdateSourceFile
(sourcePath, content => content.Replace("Waiting", "<Updated>"));
603
UpdateSourceFile
(sourcePath, content => content.Replace("<Updated>", "<Updated2>"));
729
UpdateSourceFile
(programPath, src => src.Replace("// <metadata update handler placeholder>", """
914
UpdateSourceFile
(cssPath, content => content.Replace("background-color: white;", "background-color: red;"));
951
UpdateSourceFile
(razorPath, content => content.Replace("Hello, world!", "Updated"));
962
UpdateSourceFile
(cssPath, content => content.Replace("background-color: white;", "background-color: red;"));
1233
UpdateSourceFile
(webSourcePath, src => src.Replace("/* top-level placeholder */", "builder.Services.AddRazorComponents();"));
1244
UpdateSourceFile
(webSourcePath, src => src.Replace("Hello world!", "<Updated>"));
HotReload\RuntimeProcessLauncherTests.cs (9)
469
UpdateSourceFile
(hostProgram, content => content.Replace("Waiting", "<Updated>"));
478
UpdateSourceFile
(hostProgram, content => content.Replace("Started", "<Updated>"));
681
UpdateSourceFile
(programPath, src => src.Replace("""Console.WriteLine(".");""", """Console.WriteLine(typeof(XDocument));"""));
682
UpdateSourceFile
(projectPath, src => src.Replace("<!-- items placeholder -->", """<Using Include="System.Xml.Linq"/>"""));
711
UpdateSourceFile
(appFile, code => code.Replace("Lib.Print();", "// Lib.Print();"));
739
UpdateSourceFile
(appProjFile, src => src.Replace("""
747
UpdateSourceFile
(appFile, code => code.Replace("// Lib.Print();", "Lib.Print();"));
798
UpdateSourceFile
(projFilePath, source => source.Replace("""
804
UpdateSourceFile
(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)
30
UpdateSourceFile
(Path.Combine(projectDir, "include", "Foo.cs"), src => src);