2 overrides of WithChanges
Microsoft.CodeAnalysis (1)
Text\ChangedText.cs (1)
153public override SourceText WithChanges(IEnumerable<TextChange> changes)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
186public override SourceText WithChanges(IEnumerable<TextChange> changes)
68 references to WithChanges
Microsoft.CodeAnalysis (4)
Text\ChangedText.cs (1)
158var changed = _newText.WithChanges(changes) as ChangedText;
Text\SourceText.cs (3)
673return WithChanges(changes); 736/// Changes do not have to be in sorted order. However, <see cref="WithChanges(IEnumerable{TextChange})"/> will 743return this.WithChanges((IEnumerable<TextChange>)changes);
Microsoft.CodeAnalysis.CodeStyle (1)
AbstractIndentation.Indenter.cs (1)
172var updatedSourceText = Text.WithChanges(changes);
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
AbstractConflictMarkerCodeFixProvider.cs (2)
310var finalText = text.WithChanges(edits); 430var finalText = text.WithChanges(edits);
ParsedDocument.cs (1)
66=> WithChangedText(Text.WithChanges(changes), cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
66var changedText = text.WithChanges(edits);
ConditionalExpressionPlacementCodeFixProvider.cs (1)
67var changedText = text.WithChanges(edits);
ConvertNamespaceTransform.cs (1)
133var dedentedText = text.WithChanges(changes);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
156var newTextAfterChanges = snapshotBeforePaste.AsText().WithChanges(textChanges);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
StringIndentation\StringIndentationTests.cs (1)
62var changedText = text.WithChanges(changes);
Microsoft.CodeAnalysis.CSharp.Features (5)
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
66var changedText = text.WithChanges(edits);
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
62var formattedText = context.Document.Text.WithChanges(formattingChanges);
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
118var newText = text.WithChanges(builder);
ConditionalExpressionPlacementCodeFixProvider.cs (1)
67var changedText = text.WithChanges(edits);
ConvertNamespaceTransform.cs (1)
133var dedentedText = text.WithChanges(changes);
Microsoft.CodeAnalysis.EditorFeatures (2)
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
72var originalDocument = currentDocument.WithText(currentText.WithChanges(intentRequestContext.PriorTextEdits));
Shared\Extensions\WorkspaceExtensions.cs (1)
43var newText = oldText.WithChanges(textChanges);
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
203return base.WithChanges(changes);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
InlineHints\AbstractInlineHintsTests.vb (1)
69Dim newText = value.WithChanges(textChanges).ToString()
Microsoft.CodeAnalysis.Features (11)
AbstractConflictMarkerCodeFixProvider.cs (2)
310var finalText = text.WithChanges(edits); 430var finalText = text.WithChanges(edits);
AddImport\CodeActions\AddImportCodeAction.cs (1)
61var newText = oldText.WithChanges(_textChanges);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaBatchFixHelpers.cs (1)
108var newText = currentText.WithChanges(orderedChanges);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (2)
137var newText = text.WithChanges(orderedTextInserts); 191var newText = text.WithChanges(textChanges);
Completion\Providers\AbstractAwaitCompletionProvider.cs (1)
214var newText = text.WithChanges(builder);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (1)
169var newText = text.WithChanges(builder);
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (1)
40var allChangesText = strippedText.WithChanges(snippet.TextChanges);
FullyQualify\AbstractFullyQualifyCodeFixProvider.cs (1)
42var newText = sourceText.WithChanges(d.TextChanges);
Snippets\SnippetProviders\AbstractSnippetProvider.cs (1)
212originalText = originalText.WithChanges(snippets);
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Handler\DocumentChanges\DidChangeHandler.cs (1)
40text = text.WithChanges(changes);
Handler\InlineCompletions\InlineCompletionsHandler.cs (2)
152var formattedText = documentWithSnippetText.WithChanges(formattingChanges); 186var formattedLspSnippetText = formattedText.GetSubText(spanContainingFormattedSnippet).WithChanges(lspTextChanges);
Handler\OnAutoInsert\OnAutoInsertHandler.cs (2)
157var newSourceText = sourceText.WithChanges(textChanges); 215documentText = documentText.WithChanges(textChanges);
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
68var newText = new SerializableSourceText(text.WithChanges(textChanges));
Microsoft.CodeAnalysis.UnitTests (15)
Text\TextChangeTests.cs (15)
989var change1 = originalText.WithChanges(oldChangesBuilder); 1008var change2 = change1.WithChanges(newChangesBuilder); 1012Assert.Equal(originalText.WithChanges(textChanges).ToString(), change2.ToString()); 1053Assert.Equal("bb34", originalText.WithChanges(changes).ToString()); 1067Assert.Equal(change2.ToString(), original.WithChanges(changes).ToString()); 1081Assert.Equal("bb1234", originalText.WithChanges(changes).ToString()); 1094Assert.Equal("bbbaa12aa4", originalText.WithChanges(changes).ToString()); 1108Assert.Equal("4bbaa5", originalText.WithChanges(changes).ToString()); 1122Assert.Equal("baababbbbbaabbbbba7", originalText.WithChanges(changes).ToString()); 1136Assert.Equal("b1b4", originalText.WithChanges(changes).ToString()); 1150Assert.Equal("bab234", originalText.WithChanges(changes).ToString()); 1164Assert.Equal("bbb5", originalText.WithChanges(changes).ToString()); 1178Assert.Equal("6", originalText.WithChanges(changes).ToString()); 1192Assert.Equal("5", originalText.WithChanges(changes).ToString()); 1206Assert.Equal("14", originalText.WithChanges(changes).ToString());
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
Formatting\FormattingTests.vb (1)
3024Dim document2 = document.WithText((Await document.GetTextAsync()).WithChanges(result))
Microsoft.CodeAnalysis.Workspaces (9)
AbstractIndentation.Indenter.cs (1)
172var updatedSourceText = Text.WithChanges(changes);
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (2)
36? document.WithText(oldText.WithChanges(result.GetTextChanges(cancellationToken))) 47? root.SyntaxTree.WithChangedText(oldText.WithChanges(result.GetTextChanges(cancellationToken))).GetRootAsync(cancellationToken)
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
75var newText = oldText.WithChanges(changesToApply);
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (1)
78var newText = oldText.WithChanges(adjustedChanges);
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
128return new LinkedFileMergeResult(allLinkedDocuments, originalSourceText.WithChanges(allChanges), mergeConflictResolutionSpan);
ParsedDocument.cs (1)
66=> WithChangedText(Text.WithChanges(changes), cancellationToken);
Remote\RemoteUtilities.cs (1)
56currentSolution = currentSolution.WithDocumentText(docId, text.WithChanges(textChanges));
Workspace\Workspace.cs (1)
1725this.ApplyDocumentTextChanged(documentId, oldText.WithChanges(textChanges));
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
Formatting\FormattingTestBase.cs (2)
96var resultText = sourceText.WithChanges(result); 135var actual = sourceText.WithChanges(result).ToString();
GenerateFileForEachAdditionalFileWithContentsCommented.cs (1)
33var generatedText = sourceText.WithChanges(changes);
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Features\InlineRename\XamlEditorInlineRenameService.cs (1)
165var newSource = oldSource.WithChanges(group.Select(l => new TextChange(l.TextSpan, replacementText)));