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