67 references to AsTextContainer
Microsoft.CodeAnalysis.EditorFeatures (19)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
111var sourceTextContainer = args.SubjectBuffer.AsTextContainer();
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (3)
110_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer()); 273var bufferDocumentId = _workspace.GetDocumentIdInCurrentContext(_subjectBuffer.AsTextContainer()); 291var documentId = _workspace.GetDocumentIdInCurrentContext(_subjectBuffer.AsTextContainer());
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
49var document = args.SubjectBuffer.AsTextContainer().GetOpenDocumentInCurrentContext();
IntelliSense\AsyncCompletion\ItemManager.CompletionListUpdater.cs (1)
93_document = snapshotForDocument?.TextBuffer.AsTextContainer().GetOpenDocumentInCurrentContext();
Interactive\InteractiveSession.cs (1)
249_workspace.OpenDocument(newSubmissionDocumentId, submissionBuffer.AsTextContainer());
NavigationBar\NavigationBarController.cs (1)
241var textContainer = _subjectBuffer.AsTextContainer();
Preview\AbstractPreviewFactoryService.cs (2)
290rightWorkspace.Target.OpenDocument(document.Id, newEditorDocument.TextBuffer.AsTextContainer()); 372leftWorkspace.Target.OpenDocument(document.Id, oldEditorDocument.TextBuffer.AsTextContainer());
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
301if (Buffer.AsTextContainer().CurrentText == text &&
SemanticSearch\SemanticSearchEditorWorkspace.cs (1)
38OnDocumentOpened(queryDocument.Id, buffer.AsTextContainer());
Shared\Extensions\HostWorkspaceServicesExtensions.cs (1)
41=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out var workspace) ?
Shared\Extensions\ITextBufferExtensions.cs (1)
28=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out workspace);
Shared\Extensions\ITextSnapshotExtensions.cs (1)
64var document = snapshot.TextBuffer.AsTextContainer().GetOpenDocumentInCurrentContext();
Shared\Tagging\EventSources\AbstractWorkspaceTrackingTaggerEventSource.cs (1)
25_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
Structure\AbstractStructureTaggerProvider.cs (1)
60var openDocument = subjectBuffer.AsTextContainer().GetRelatedDocuments().FirstOrDefault();
Tagging\AbstractAsynchronousTaggerProvider.TagSource.cs (1)
158_workspaceRegistration = Workspace.GetWorkspaceRegistration(subjectBuffer.AsTextContainer());
Tagging\AbstractAsynchronousTaggerProvider.TagSource_ProduceTags.cs (1)
445var container = snapshot.TextBuffer.AsTextContainer();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (6)
Completion\AbstractCompletionProviderTests.cs (1)
898var textContainer = testWorkspace.Documents.First().GetTextBuffer().AsTextContainer();
Workspaces\EditorTestHostDocument.cs (5)
171workspace.OnSourceGeneratedDocumentOpened(_textBuffer.AsTextContainer(), document); 176workspace.OnDocumentOpened(linkedId, _textBuffer.AsTextContainer(), isCurrentContext: !testDocument.IsLinkFile); 181workspace.OnAdditionalDocumentOpened(linkedId, _textBuffer.AsTextContainer()); 185workspace.OnAnalyzerConfigDocumentOpened(linkedId, _textBuffer.AsTextContainer()); 197=> this.GetTextBuffer().AsTextContainer();
Microsoft.CodeAnalysis.EditorFeatures.Text (3)
Extensions.cs (3)
53var container = buffer.AsTextContainer(); 87=> buffer.AsTextContainer().GetRelatedDocuments(); 90=> Workspace.TryGetWorkspace(buffer.AsTextContainer(), out var workspace) &&
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
TextEditor\OpenDocumentTests.cs (1)
34var sourceTextContainer = buffer.AsTextContainer();
TextEditor\TryGetDocumentTests.cs (2)
29var container = buffer.AsTextContainer(); 59var container = buffer.AsTextContainer();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
InlineDiagnostics\InlineDiagnosticsAdornmentManager.cs (1)
62var document = TextView.TextBuffer.AsTextContainer()?.GetOpenDocumentInCurrentContext();
InlineRename\UI\InlineRenameAdornmentManager.cs (1)
178return textView.BufferGraph.GetTextBuffers(b => GetWorkspace(b.AsTextContainer()) == workspace)
QuickInfo\ContentControlService.cs (1)
71workspace.OpenDocument(document.Id, textBuffer.AsTextContainer());
Suggestions\SuggestedActionsSource.State.cs (1)
34Registration = Workspace.GetWorkspaceRegistration(textBuffer.AsTextContainer());
Suggestions\SuggestedActionWithNestedFlavors.cs (1)
158var preferredDocumentId = Workspace.GetDocumentIdInCurrentContext(SubjectBuffer.AsTextContainer());
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
PasteTracking\PasteTrackingTestState.vb (1)
98Assert.False(PasteTrackingService.TryGetPastedTextSpan(textBuffer.AsTextContainer(), textSpan))
Microsoft.VisualStudio.LanguageServices (26)
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (2)
181_workspace.OpenDocument(document.Id, _projectionBuffer.AsTextContainer()); 184_workspace.OpenDocument(link, _projectionBuffer.AsTextContainer());
Implementation\VisualStudioSupportsFeatureService.cs (2)
55var sourceTextContainer = textBuffer.AsTextContainer(); 70var sourceTextContainer = textBuffer.AsTextContainer();
LanguageService\AbstractLanguageService`2.cs (1)
156var openDocument = wpfTextView.TextBuffer.AsTextContainer().GetRelatedDocuments().FirstOrDefault();
LanguageService\AbstractLanguageService`2.VsCodeWindowManager.cs (1)
81var document = textBuffer?.AsTextContainer()?.GetRelatedDocuments().FirstOrDefault();
Preview\PreviewUpdater.cs (1)
95container = _textView.TextBuffer.AsTextContainer();
ProjectSystem\MiscellaneousFilesWorkspace.cs (3)
157var registration = Workspace.GetWorkspaceRegistration(textBuffer.AsTextContainer()); 269if (_fileTrackingMetadataAsSourceService.TryAddDocumentToWorkspace(moniker, textBuffer.AsTextContainer(), out var _)) 279var sourceTextContainer = textBuffer.AsTextContainer();
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
156var textContainer = textBuffer.AsTextContainer();
Snippets\AbstractSnippetCommandHandler.cs (7)
95if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 148if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 181if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 214if (!Workspace.TryGetWorkspace(args.SubjectBuffer.AsTextContainer(), out _)) 262var currentText = subjectBuffer.AsTextContainer().CurrentText; 311var textContainer = args.SubjectBuffer.AsTextContainer(); 329var document = args.SubjectBuffer.AsTextContainer().GetOpenDocumentInCurrentContext();
ValueTracking\ValueTrackingCommandHandler.cs (1)
93var sourceTextContainer = args.SubjectBuffer.AsTextContainer();
Venus\ContainedDocument.cs (1)
164=> this.SubjectBuffer.AsTextContainer();
Venus\ContainedLanguage.cs (3)
104SubjectBuffer.AsTextContainer(), 122Workspace.OnDocumentOpened(documentId, SubjectBuffer.AsTextContainer()); 150this.Project.RemoveSourceTextContainer(SubjectBuffer.AsTextContainer());
Workspace\SourceGeneratedFileManager.cs (1)
405this.Workspace.OnSourceGeneratedDocumentOpened(_textBuffer.AsTextContainer(), generatedDocument);
Workspace\VisualStudioActiveDocumentTracker.cs (1)
243var textContainer = TextBuffer.AsTextContainer();
Workspace\VisualStudioTextUndoHistoryWorkspaceServiceFactory.cs (1)
49var documentId = editorWorkspace.GetDocumentIdInCurrentContext(textBuffer.AsTextContainer());
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
219var textContainer = textBuffer.AsTextContainer();
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
ProjectSystemShim\VisualStudioProjectTests\SourceTextContainerTests.vb (1)
24Dim sourceTextContainer = textBufferFactory.CreateTextBuffer().AsTextContainer()
Microsoft.VisualStudio.LanguageServices.VisualBasic (1)
Snippets\SnippetCommandHandler.vb (1)
87Dim text = subjectBuffer.AsTextContainer().CurrentText
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
175var textContainer = textBuffer?.AsTextContainer();