C# Class VSEmbed.Roslyn.EditorWorkspace

A Roslyn Workspace that contains documents linked to ITextBuffers.
Inheritance: Microsoft.CodeAnalysis.Workspace
Afficher le fichier Open project: SLaks/VSEmbed Class Usage Examples

Méthodes publiques

Méthode Description
CanApplyChange ( ApplyChangesKind feature ) : bool

EditorWorkspace can apply any kind of change.

CloseDocument ( DocumentId documentId ) : void

Unlinks an opened Document from its ITextBuffer.

CreateDocument ( ProjectId projectId, ITextBuffer buffer, string debugName = null ) : DocumentId

Creates a new document linked to an existing text buffer.

CreateFrameworkReference ( string assemblyName ) : Microsoft.CodeAnalysis.MetadataReference

Creates a MetadataReference to a BCL assembly, with XML documentation.

EditorWorkspace ( Microsoft.CodeAnalysis.Host.HostServices host ) : System

Creates an EditorWorkspace powered by the specified MEF host services.

OpenDocument ( DocumentId documentId, ITextBuffer buffer ) : void

Links an existing Document to an ITextBuffer, synchronizing their contents.

Méthodes protégées

Méthode Description
ApplyDocumentTextChanged ( DocumentId id, Microsoft.CodeAnalysis.Text.SourceText text ) : void

Applies document text changes to documents backed by ITextBuffers.

Private Methods

Méthode Description
GetInternalService ( Type interfaceType ) : object

Gets a non-public IWorkspaceService from this instance.

UpdateText ( Microsoft.CodeAnalysis.Text.SourceText newText, ITextBuffer buffer, EditOptions options ) : void

Method Details

ApplyDocumentTextChanged() protected méthode

Applies document text changes to documents backed by ITextBuffers.
protected ApplyDocumentTextChanged ( DocumentId id, Microsoft.CodeAnalysis.Text.SourceText text ) : void
id DocumentId
text Microsoft.CodeAnalysis.Text.SourceText
Résultat void

CanApplyChange() public méthode

EditorWorkspace can apply any kind of change.
public CanApplyChange ( ApplyChangesKind feature ) : bool
feature ApplyChangesKind
Résultat bool

CloseDocument() public méthode

Unlinks an opened Document from its ITextBuffer.
public CloseDocument ( DocumentId documentId ) : void
documentId DocumentId
Résultat void

CreateDocument() public méthode

Creates a new document linked to an existing text buffer.
public CreateDocument ( ProjectId projectId, ITextBuffer buffer, string debugName = null ) : DocumentId
projectId ProjectId
buffer ITextBuffer
debugName string
Résultat DocumentId

CreateFrameworkReference() public static méthode

Creates a MetadataReference to a BCL assembly, with XML documentation.
public static CreateFrameworkReference ( string assemblyName ) : Microsoft.CodeAnalysis.MetadataReference
assemblyName string
Résultat Microsoft.CodeAnalysis.MetadataReference

EditorWorkspace() public méthode

Creates an EditorWorkspace powered by the specified MEF host services.
public EditorWorkspace ( Microsoft.CodeAnalysis.Host.HostServices host ) : System
host Microsoft.CodeAnalysis.Host.HostServices
Résultat System

OpenDocument() public méthode

Links an existing Document to an ITextBuffer, synchronizing their contents.
public OpenDocument ( DocumentId documentId, ITextBuffer buffer ) : void
documentId DocumentId
buffer ITextBuffer
Résultat void