Click or drag to resize

Extensions Class



Inheritance Hierarchy
SystemObject
  Microsoft.CodeAnalysis.TextExtensions

Namespace:  Microsoft.CodeAnalysis.Text
Assembly:  Microsoft.CodeAnalysis.EditorFeatures.Text (in Microsoft.CodeAnalysis.EditorFeatures.Text.dll) Version: 2.3.0-dev-56735-00. Commit Hash: <developer build>
Syntax
public static class Extensions

The Extensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAsText
Public methodStatic memberAsTextContainer
Public methodStatic memberFindCorrespondingEditorTextSnapshot
Returns the ITextSnapshot behind this SourceText, or null if it wasn't created from one. Note that multiple ITextSnapshots may map to the same SourceText instance if ITextSnapshot.Version.ReiteratedVersionNumber doesn't change.
Public methodStatic memberGetOpenDocumentInCurrentContextWithChanges
Gets the Document from the corresponding CurrentSolution that is associated with the ITextSnapshot's buffer in its current project context, updated to contain the same text as the snapshot if necessary. There may be multiple Documents associated with the buffer if it is linked into multiple projects or is part of a Shared Project. In this case, the Workspace is responsible for keeping track of which of these Documents is in the current project context.
Public methodStatic memberGetRelatedDocuments
Gets the Documents from the corresponding CurrentSolution that are associated with the ITextBuffer. There may be multiple Documents associated with the buffer if it is linked into multiple projects or is part of a Shared Project.
Public methodStatic memberGetRelatedDocumentsWithChanges
Gets the Documents from the corresponding CurrentSolution that are associated with the ITextSnapshot's buffer, updated to contain the same text as the snapshot if necessary. There may be multiple Documents associated with the buffer if the file is linked into multiple projects or is part of a Shared Project.
Public methodStatic memberGetTextBuffer
Public methodStatic memberGetWorkspace
Gets the workspace corresponding to the text buffer.
Public methodStatic memberTryGetTextBuffer
Top
See Also