53 references to AsText
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
StringCopyPaste\AbstractPasteProcessor.cs (2)
108
TextBeforePaste = SnapshotBeforePaste.
AsText
();
109
TextAfterPaste = SnapshotAfterPaste.
AsText
();
StringCopyPaste\StringCopyPasteCommandHandler.cs (4)
144
var newTextAfterChanges = snapshotBeforePaste.
AsText
().WithChanges(textChanges);
190
parsedDocumentBeforePaste, subjectBuffer, snapshotBeforePaste.
AsText
(), stringExpressionBeforePaste, documentBeforePaste.Project.GetFallbackAnalyzerOptions(), cancellationToken);
305
var originalStringContentsAfterPaste = snapshotAfterPaste.
AsText
().GetSubText(spanAfterPaste);
334
var contentSpans = StringInfo.GetStringInfo(snapshot.
AsText
(), stringExpression).ContentSpans;
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (4)
2481
var actualCodeAfterCommit = textView.TextBuffer.CurrentSnapshot.
AsText
().ToString();
2734
var actualCodeAfterCommit = textView.TextBuffer.CurrentSnapshot.
AsText
().ToString();
2789
var actualCodeAfterCommit = textView.TextBuffer.CurrentSnapshot.
AsText
().ToString();
3266
var actualCodeAfterCommit = textBuffer.CurrentSnapshot.
AsText
().ToString();
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
99
Assert.Equal(expectedOutput, textBuffer.CurrentSnapshot.
AsText
().ToString());
Microsoft.CodeAnalysis.EditorFeatures (15)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (2)
465
span.Snapshot.
AsText
(), span.Span.ToTextSpan(), classifiedSpans, CancellationToken.None);
543
var currentText = currentSnapshot.
AsText
();
CommentSelection\AbstractCommentSelectionBase.cs (1)
148
var newText = subjectBuffer.CurrentSnapshot.
AsText
();
CommentSelection\CommentUncommentSelectionCommandHandler.cs (1)
236
var text = span.Snapshot.
AsText
();
CommentSelection\ToggleBlockCommentCommandHandler.cs (1)
41
var allText = snapshot.
AsText
();
Editor\TextEditApplication.cs (2)
18
var oldText = oldSnapshot.
AsText
();
26
var oldText = oldSnapshot.
AsText
();
IntelliSense\IDocumentProvider.cs (1)
27
return snapshot.
AsText
().GetDocumentWithFrozenPartialSemantics(cancellationToken);
Interactive\InteractiveSession.cs (1)
222
var newSubmissionText = submissionBuffer.CurrentSnapshot.
AsText
();
Interactive\InteractiveWorkspace.cs (1)
58
OnDocumentTextChanged(document, appliedText.
AsText
(), PreservationMode.PreserveIdentity);
NavigationBar\NavigationBarController.cs (1)
307
var document = textSnapshot.
AsText
().GetDocumentWithFrozenPartialSemantics(cancellationToken);
NavigationBar\NavigationBarController_ModelComputation.cs (2)
110
? textSnapshot.
AsText
().GetDocumentWithFrozenPartialSemantics(cancellationToken)
111
: textSnapshot.
AsText
().GetOpenDocumentInCurrentContextWithChanges();
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
172
var beforeText = eventArgs.Before.
AsText
();
Undo\EditorSourceTextUndoService.cs (1)
41
var sourceText = snapshot?.
AsText
();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Completion\AbstractCompletionProviderTests.cs (3)
663
var actualCodeAfterCommit = textBuffer.CurrentSnapshot.
AsText
().ToString();
700
var actualCodeAfterCommit = textBuffer.CurrentSnapshot.
AsText
().ToString();
1274
var text = hostDocument.GetTextBuffer().CurrentSnapshot.
AsText
();
Squiggles\TestDiagnosticTagProducer.cs (1)
31
var sourceText = document.GetTextBuffer().CurrentSnapshot.
AsText
();
Workspaces\EditorTestHostDocument.cs (1)
219
var oldText = buffer.CurrentSnapshot.
AsText
();
Microsoft.CodeAnalysis.EditorFeatures.Text (6)
Extensions.cs (4)
37
=> line.Snapshot.
AsText
().Lines[line.LineNumber];
68
=> text.
AsText
().GetRelatedDocumentsWithChanges();
77
=> text.
AsText
().GetOpenDocumentInCurrentContextWithChanges();
80
=> text.
AsText
().GetOpenTextDocumentInCurrentContextWithChanges();
Extensions.TextBufferContainer.cs (2)
61
? editorBuffer.CurrentSnapshot.
AsText
()
109
var oldText = (SnapshotSourceText)args.Before.
AsText
();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
EditorAdapter\TextSnapshotImplementationTest.cs (1)
23
var text = buffer.CurrentSnapshot.
AsText
();
TextEditor\TryGetDocumentTests.cs (2)
58
var text = buffer.CurrentSnapshot.
AsText
();
72
var newText = buffer.CurrentSnapshot.
AsText
();
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
LineCommit\CommitFormatter.vb (1)
58
Dim document = currentSnapshot.
AsText
().GetDocumentWithFrozenPartialSemantics(cancellationToken)
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (1)
146
Dim text = textSnapshot.
AsText
()
Microsoft.VisualStudio.LanguageServices (10)
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (2)
172
var forkedSolution = solution.WithDocumentText(document.Id, _projectionBuffer.CurrentSnapshot.
AsText
(), PreservationMode.PreserveIdentity);
175
forkedSolution = forkedSolution.WithDocumentText(link, _projectionBuffer.CurrentSnapshot.
AsText
(), PreservationMode.PreserveIdentity);
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
272
var document = snapshot.
AsText
().GetDocumentWithFrozenPartialSemantics(cancellationToken);
Preview\FileChange.cs (1)
197
return _buffer.CurrentSnapshot.
AsText
();
Venus\ContainedDocument.cs (3)
210
var originalText = SubjectBuffer.CurrentSnapshot.
AsText
();
215
=> ApplyChanges(SubjectBuffer.CurrentSnapshot.
AsText
(), changes);
770
Debug.Assert(ReferenceEquals(parsedDocument.Text, subjectBuffer.CurrentSnapshot.
AsText
()));
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
282
return (line.Snapshot.
AsText
().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan()));
287
return (line.Snapshot.
AsText
().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan()));
Workspace\SourceGeneratedFileManager.cs (1)
529
var sourceText = _textBuffer.CurrentSnapshot.
AsText
();
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
509
var oldText = oldSnapshot.
AsText
();