27 references to WithReplaceFirst
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (26)
Syntax\SyntaxEquivalenceTests.vb (26)
83Dim tree2 = tree1.WithReplaceFirst("N", "N1") 91Dim tree2 = tree1.WithReplaceFirst("z", "y") 99Dim tree2 = tree1.WithReplaceFirst("N", "N") 107Dim tree2 = tree1.WithReplaceFirst("z", "z") 139Dim tree2 = tree1.WithReplaceFirst("5", "6") 147Dim tree2 = tree1.WithReplaceFirst("5", "6") 155Dim tree2 = tree1.WithReplaceFirst("true", "false") 163Dim tree2 = tree1.WithReplaceFirst("Write", "WriteLine") 171Dim tree2 = tree1.WithReplaceFirst("System", "System.Linq") 187Dim tree2 = tree1.WithReplaceFirst("sub Goo()", "function Goo() as Integer") 219Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("\n #if true \n sub Goo() \n end sub \n #end if \n")) 227Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("\n #if false \n sub Goo() \n end sub \n #end if \n")) 235Dim tree2 = tree1.WithReplaceFirst(NewLines("dim i as Integer \n"), NewLines("\n #if true \n dim i as Integer \n #end if \n")) 243Dim tree2 = tree1.WithReplaceFirst(NewLines("dim i as Integer \n"), NewLines("\n #if false \n dim i as Integer \n #end if \n")) 268Dim tree2 = tree1.WithReplaceFirst("N1", "N2") 272tree2 = tree1.WithReplaceFirst("Hello", "World") 298Dim tree2 = tree1.WithReplaceFirst("5", "6") 306Dim tree2 = tree1.WithReplaceFirst("5", "6") 314Dim tree2 = tree1.WithReplaceFirst("5", "6") 322Dim tree2 = tree1.WithReplaceFirst("7", "8") 325tree2 = tree1.WithReplaceFirst("5", "6") 333Dim tree2 = tree1.WithReplaceFirst("5", "6") 341Dim tree2 = tree1.WithReplaceFirst("5", "6") 344tree2 = tree1.WithReplaceFirst("7", "8") 482Dim tree2 = tree1.WithReplaceFirst("Console.Write(0)", "' Console.Write(0) ") 490Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("' sub Goo() \n ' end sub \n"))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
SyntaxTreeExtensions.vb (1)
57Return WithReplaceFirst(syntaxTree, oldText, String.Empty)