31 references to WithReplaceFirst
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (30)
IncrementalParsing\BinaryExpression.cs (2)
30
var newTree = oldTree.
WithReplaceFirst
("+", "*");
200
var newTree = oldTree.
WithReplaceFirst
(oldName, newName);
IncrementalParsing\ChangingIdentifiers.cs (1)
267
var newTree = oldTree.
WithReplaceFirst
(oldName, newName);
IncrementalParsing\CompoundAssignment.cs (1)
106
var newTree = oldTree.
WithReplaceFirst
(oldName, newName);
IncrementalParsing\UnaryExpression.cs (1)
82
var newTree = oldTree.
WithReplaceFirst
(oldName, newName);
Syntax\SyntaxDiffingTests.cs (1)
247
var newTree = oldTree.
WithReplaceFirst
("class", "struct");
Syntax\SyntaxEquivalenceTests.cs (24)
112
var tree2 = tree1.
WithReplaceFirst
("N", "N1");
122
var tree2 = tree1.
WithReplaceFirst
("z", "y");
132
var tree2 = tree1.
WithReplaceFirst
("N", "N");
142
var tree2 = tree1.
WithReplaceFirst
("z", "z");
202
var tree2 = tree1.
WithReplaceFirst
("5", "6");
212
var tree2 = tree1.
WithReplaceFirst
("7", "8");
216
tree2 = tree1.
WithReplaceFirst
("5", "6");
226
var tree2 = tree1.
WithReplaceFirst
("5", "6");
236
var tree2 = tree1.
WithReplaceFirst
("5", "6");
241
tree2 = tree1.
WithReplaceFirst
("7", "8");
251
var tree2 = tree1.
WithReplaceFirst
("5", "6");
261
var tree2 = tree1.
WithReplaceFirst
("5", "6");
271
var tree2 = tree1.
WithReplaceFirst
("true", "false");
281
var tree2 = tree1.
WithReplaceFirst
("Write", "WriteLine");
291
var tree2 = tree1.
WithReplaceFirst
("System", "System.Linq");
311
var tree2 = tree1.
WithReplaceFirst
("void", "int");
351
var tree2 = tree1.
WithReplaceFirst
("Console.Write(0);", "/* Console.Write(0); */");
361
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "/* void Goo() { } */");
371
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "\r\n#if true\r\n void Goo() { }\r\n#endif\r\n");
381
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "\r\n#if false\r\n void Goo() { }\r\n#endif\r\n");
391
var tree2 = tree1.
WithReplaceFirst
("int i;", "\r\n#if true\r\n int i;\r\n#endif\r\n");
401
var tree2 = tree1.
WithReplaceFirst
("int i;", "\r\n#if false\r\n int i;\r\n#endif\r\n");
443
var tree2 = tree1.
WithReplaceFirst
("N1", "N2");
448
tree2 = tree1.
WithReplaceFirst
("Hello", "World");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SyntaxTreeExtensions.cs (1)
59
return
WithReplaceFirst
(syntaxTree, oldText, string.Empty);