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