200 references to WithChanges
IdeCoreBenchmarks (5)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (44)
IncrementalParsing\IncrementalParsingTests.cs (42)
498text = text.WithChanges(change);
530text = text.WithChanges(change);
575text = text.WithChanges(new TextChange(prefixSpan, ""), new TextChange(suffixSpan, ""));
627var withOpenBraceDeletedText = initialText.WithChanges(new TextChange(openBraceLine.SpanIncludingLineBreak, ""));
838var withCloseBraceDeletedText = withOpenBraceDeletedText.WithChanges(new TextChange(closeBraceLine.SpanIncludingLineBreak, ""));
965var newText = text.WithChanges(new TextChange(new TextSpan(0, 8), ""));
979var newText = text.WithChanges(new TextChange(new TextSpan(0, 8), ""));
2747var text2 = text.WithChanges(
2770var newText = oldText.WithChanges(new TextChange(new TextSpan(0, 0), "{"));
2786var newText = oldText.WithChanges(new TextChange(new TextSpan(0, 0), @"System.Console.WriteLine(false)
2845var newText = oldText.WithChanges(new TextChange(new TextSpan(0, 0), @"if (false)
2903var newIText = oldIText.WithChanges(change);
2917newIText = oldIText.WithChanges(change);
2987currIText = currIText.WithChanges(change);
3023currIText = currIText.WithChanges(change);
3101var newText = oldText.WithChanges(change); // f is a method decl parameter
3200text = text.WithChanges(change);
3221text = text.WithChanges(change);
3242text = text.WithChanges(change);
3263text = text.WithChanges(change);
3284text = text.WithChanges(change);
3306text = text.WithChanges(change);
3330text = text.WithChanges(change);
3354text = text.WithChanges(change);
3378text = text.WithChanges(change);
3402text = text.WithChanges(change);
3426text = text.WithChanges(change);
3452text = text.WithChanges(change);
3477text = text.WithChanges(change);
3503text = text.WithChanges(change);
3529text = text.WithChanges(change);
3547text = text.WithChanges(change);
3565text = text.WithChanges(change);
3583text = text.WithChanges(change);
3597text = text.WithChanges(change);
3611text = text.WithChanges(change);
3626text = text.WithChanges(change);
3663text = text.WithChanges(change);
3687text = text.WithChanges(
3726var newText = oldText.WithChanges(
3738var newText = oldText.WithChanges(new TextChange(new TextSpan(locationOfChange, widthOfChange), ""));
3764var newText = oldText.WithChanges(new TextChange(new TextSpan(oldText.Length, 0), newChar.ToString()));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures (7)
EditorConfigSettings\Updater\SettingsUpdateHelper.cs (4)
220return (editorConfigText.WithChanges(textChange), lastValidHeaderSpanEnd, lastValidSpecificHeaderSpanEnd);
306return (editorConfigText.WithChanges(new TextChange(new TextSpan(lastValidSpecificHeaderSpanEnd.Value.Span.End, 0), newEntry)), lastValidHeaderSpanEnd, lastValidSpecificHeaderSpanEnd);
315return (editorConfigText.WithChanges(new TextChange(new TextSpan(lastValidHeaderSpanEnd.Value.Span.End, 0), newEntry)), lastValidHeaderSpanEnd, lastValidSpecificHeaderSpanEnd);
349var result = editorConfigText.WithChanges(new TextChange(new TextSpan(editorConfigText.Length, 0), prefix + newEntry));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Microsoft.CodeAnalysis.Features (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.UnitTests (82)
Text\TextChangeTests.cs (81)
87var newText = text.WithChanges(
104Assert.Throws<ArgumentException>(() => text.WithChanges(changes));
117var newText = text.WithChanges(changes);
132var newText = text.WithChanges(changes);
141var newText = text.WithChanges(
153var newText = text.WithChanges(
170var newText = text.WithChanges(changes);
179var newText = text.WithChanges(
190var newText = text.WithChanges(
205var newText = text.WithChanges(
215var newText = text.WithChanges(
239var newText = text.WithChanges(changes);
270var changedText = SourceText.From(originalText).WithChanges(changes);
636var change1 = original.WithChanges(new TextChange(new TextSpan(5, 6), string.Empty)); // prepare a ChangedText instance
637var change2 = change1.WithChanges(); // this should not cause exception
647var change1 = original.WithChanges(new TextChange(new TextSpan(5, 6), string.Empty)); // prepare a ChangedText instance
648var change2 = change1.WithChanges(new TextChange(new TextSpan(2, 0), string.Empty)); // this should not cause exception
657var change1 = original.WithChanges(new TextChange(new TextSpan(6, 0), "Cruel "));
658var change2 = change1.WithChanges(new TextChange(new TextSpan(7, 3), "oo"));
672var change1 = original.WithChanges(new TextChange(new TextSpan(1, 3), "aa"));
673var change2 = change1.WithChanges(new TextChange(new TextSpan(2, 0), "bb"));
686var change1 = original.WithChanges(new TextChange(new TextSpan(1, 1), "aaa"));
687var change2 = change1.WithChanges(new TextChange(new TextSpan(3, 0), "bb"));
700var change1 = original.WithChanges(new TextChange(new TextSpan(1, 3), "aa"));
701var change2 = change1.WithChanges(new TextChange(new TextSpan(2, 1), "bb"));
713var change1 = original.WithChanges(new TextChange(new TextSpan(6, 0), "Cruel "));
714var change2 = change1.WithChanges(new TextChange(new TextSpan(2, 14), "ar"));
727var change1 = original.WithChanges(new TextChange(new TextSpan(6, 0), "Cruel "));
728var change2 = change1.WithChanges(new TextChange(new TextSpan(4, 6), " Bel"));
741var change1 = original.WithChanges(new TextChange(new TextSpan(6, 0), "Cruel "));
742var change2 = change1.WithChanges(new TextChange(new TextSpan(7, 6), "wazy V"));
755var change1 = original.WithChanges(new TextChange(new TextSpan(1, 0), "aa"));
756var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 0), "bb"));
768var change1 = original.WithChanges(new TextChange(new TextSpan(1, 3), "aa"));
769var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 0), "bb"));
781var change1 = original.WithChanges(new TextChange(new TextSpan(1, 0), "aa"));
782var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 1), "bb"));
794var change1 = original.WithChanges(new TextChange(new TextSpan(1, 0), "aa"));
795var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 2), "bb"));
807var change1 = original.WithChanges(new TextChange(new TextSpan(1, 0), "aa"));
808var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 3), "bb"));
821var change1 = original.WithChanges(new TextChange(new TextSpan(1, 3), "aa"));
822var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 1), "bb"));
835var change1 = original.WithChanges(new TextChange(new TextSpan(1, 3), "aa"));
836var change2 = change1.WithChanges(new TextChange(new TextSpan(1, 3), "bb"));
847var change1 = original.WithChanges(new TextChange(new TextSpan(4, 0), "o "));
848var change2 = change1.WithChanges(new TextChange(new TextSpan(6, 0), "World"));
861var change1 = original.WithChanges(new TextChange(new TextSpan(4, 0), "o"));
862var change2 = change1.WithChanges(new TextChange(new TextSpan(6, 0), "World"));
877var change1 = original.WithChanges(new TextChange(new TextSpan(8, 0), "l"));
878var change2 = change1.WithChanges(new TextChange(new TextSpan(4, 0), "o"));
893var change1 = original.WithChanges(new TextChange(new TextSpan(4, 0), " World"));
895var change2 = change1.WithChanges(new TextChange(new TextSpan(4, 0), "o"));
911c => c.WithChanges(new TextChange(new TextSpan(4, 0), "o ")),
912c => c.WithChanges(new TextChange(new TextSpan(6, 0), "World")));
1047var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 2), "a"));
1048var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 2), "bb"));
1061var change1 = original.WithChanges(new TextChange(new TextSpan(0, 0), "aa"), new TextChange(new TextSpan(1, 1), "aa"));
1062var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 1), "b"), new TextChange(new TextSpan(2, 2), ""));
1075var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 0), "a"));
1076var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 2), ""), new TextChange(new TextSpan(2, 0), "bb"));
1089var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 1), "aa"), new TextChange(new TextSpan(3, 1), "aa"));
1090var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 0), "bbb"));
1102var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 3), "a"), new TextChange(new TextSpan(5, 0), "aaa"));
1103var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 2), ""), new TextChange(new TextSpan(3, 1), "bb"));
1116var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 1), "aaaaa"), new TextChange(new TextSpan(3, 1), "aaaa"), new TextChange(new TextSpan(6, 1), "aaaaa"));
1117var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 0), "b"), new TextChange(new TextSpan(2, 0), "b"), new TextChange(new TextSpan(3, 4), "bbbbb"), new TextChange(new TextSpan(9, 5), "bbbbb"), new TextChange(new TextSpan(15, 3), ""));
1130var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 1), "a"));
1131var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 1), "b"), new TextChange(new TextSpan(2, 2), "b"));
1144var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 1), "aa"));
1145var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 0), "b"), new TextChange(new TextSpan(1, 2), "b"));
1158var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 2), "a"), new TextChange(new TextSpan(3, 2), "a"));
1159var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 3), "bbb"));
1172var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 4), ""), new TextChange(new TextSpan(5, 1), ""));
1173var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 1), ""), new TextChange(new TextSpan(1, 0), ""));
1186var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 2), ""), new TextChange(new TextSpan(3, 1), ""), new TextChange(new TextSpan(4, 0), ""), new TextChange(new TextSpan(4, 0), ""), new TextChange(new TextSpan(4, 0), ""));
1187var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 1), ""), new TextChange(new TextSpan(1, 1), ""), new TextChange(new TextSpan(2, 0), ""));
1200var change1 = originalText.WithChanges(new TextChange(new TextSpan(0, 1), ""), new TextChange(new TextSpan(2, 1), ""));
1201var change2 = change1.WithChanges(new TextChange(new TextSpan(0, 0), ""), new TextChange(new TextSpan(1, 1), ""));
1233var changedText = text.WithChanges(edits1);
1244var changedText2 = changedText.WithChanges(edits2);
Microsoft.CodeAnalysis.VisualBasic.Features (3)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (16)
IncrementalParser\IncrementalParser.vb (16)
91text = text.WithChanges(New TextChange(span, text.ToString(span)))
112Dim newText = text.WithChanges(New TextChange(New TextSpan(text.Length, 0), _s.Substring(i, 1)))
129Dim newText = oldText.WithChanges(New TextChange(New TextSpan(pos, 0), "'"))
138Dim anotherText = newText.WithChanges(New TextChange(New TextSpan(pos, 1), ""))
705Dim newText = oldText.WithChanges(New TextChange(New TextSpan(22, 0), " Sub "))
744Dim newText = oldText.WithChanges(New TextChange(New TextSpan(103, 0), " "))
770Dim newText = oldText.WithChanges(New TextChange(New TextSpan(insertionPoint, 0), " "))
795Dim newText = oldText.WithChanges(New TextChange(New TextSpan(insertionPoint, replace.Length), "{"))
830Dim newText = oldText.WithChanges(New TextChange(New TextSpan(pos, 0), "'"))
1125Dim newIText = oldIText.WithChanges(change)
1162Dim newIText = oldIText.WithChanges(change)
1168newIText = newIText.WithChanges(change)
1208Dim newText = oldText.WithChanges(change)
1226Dim newText = oldText.WithChanges(change)
1244Dim newText = oldText.WithChanges(change)
1678Dim newText = oldText.WithChanges(change)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (5)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
Microsoft.VisualStudio.LanguageServices (1)
Microsoft.VisualStudio.LanguageServices.UnitTests (6)
Roslyn.VisualStudio.Next.UnitTests (2)