44 references to WithReplaceFirst
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (43)
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\IncrementalParsingTests.cs (13)
49
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
70
var newTree = oldTree.
WithReplaceFirst
("?", "");
97
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
133
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
150
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
166
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
184
var newTree = oldTree.
WithReplaceFirst
("class", "interface");
202
var newTree = oldTree.
WithReplaceFirst
("class", "struct");
218
var newTree = oldTree.
WithReplaceFirst
("goo", "bar");
240
var newTree = oldTree.
WithReplaceFirst
("GOO", "BAR");
262
var newTree = oldTree.
WithReplaceFirst
("GOO", "BAR");
286
var newTree = oldTree.
WithReplaceFirst
("GOO", "BAR");
2745
var newTree = oldTree.
WithReplaceFirst
(@"world"" ", @"world"" ");
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)
111
var tree2 = tree1.
WithReplaceFirst
("N", "N1");
121
var tree2 = tree1.
WithReplaceFirst
("z", "y");
131
var tree2 = tree1.
WithReplaceFirst
("N", "N");
141
var tree2 = tree1.
WithReplaceFirst
("z", "z");
201
var tree2 = tree1.
WithReplaceFirst
("5", "6");
211
var tree2 = tree1.
WithReplaceFirst
("7", "8");
215
tree2 = tree1.
WithReplaceFirst
("5", "6");
225
var tree2 = tree1.
WithReplaceFirst
("5", "6");
235
var tree2 = tree1.
WithReplaceFirst
("5", "6");
240
tree2 = tree1.
WithReplaceFirst
("7", "8");
250
var tree2 = tree1.
WithReplaceFirst
("5", "6");
260
var tree2 = tree1.
WithReplaceFirst
("5", "6");
270
var tree2 = tree1.
WithReplaceFirst
("true", "false");
280
var tree2 = tree1.
WithReplaceFirst
("Write", "WriteLine");
290
var tree2 = tree1.
WithReplaceFirst
("System", "System.Linq");
310
var tree2 = tree1.
WithReplaceFirst
("void", "int");
350
var tree2 = tree1.
WithReplaceFirst
("Console.Write(0);", "/* Console.Write(0); */");
360
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "/* void Goo() { } */");
370
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "\r\n#if true\r\n void Goo() { }\r\n#endif\r\n");
380
var tree2 = tree1.
WithReplaceFirst
("void Goo() { }", "\r\n#if false\r\n void Goo() { }\r\n#endif\r\n");
390
var tree2 = tree1.
WithReplaceFirst
("int i;", "\r\n#if true\r\n int i;\r\n#endif\r\n");
400
var tree2 = tree1.
WithReplaceFirst
("int i;", "\r\n#if false\r\n int i;\r\n#endif\r\n");
442
var tree2 = tree1.
WithReplaceFirst
("N1", "N2");
447
tree2 = tree1.
WithReplaceFirst
("Hello", "World");
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
SyntaxTreeExtensions.cs (1)
59
return
WithReplaceFirst
(syntaxTree, oldText, string.Empty);