C# Класс VSEmbed.Roslyn.EditorWorkspace

A Roslyn Workspace that contains documents linked to ITextBuffers.
Наследование: Microsoft.CodeAnalysis.Workspace
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
ApplyDocumentTextChanged ( DocumentId id, Microsoft.CodeAnalysis.Text.SourceText text ) : void

Applies document text changes to documents backed by ITextBuffers.

Приватные методы

Метод Описание
GetInternalService ( Type interfaceType ) : object

Gets a non-public IWorkspaceService from this instance.

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

Описание методов

ApplyDocumentTextChanged() защищенный Метод

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
Результат void

CanApplyChange() публичный Метод

EditorWorkspace can apply any kind of change.
public CanApplyChange ( ApplyChangesKind feature ) : bool
feature ApplyChangesKind
Результат bool

CloseDocument() публичный Метод

Unlinks an opened Document from its ITextBuffer.
public CloseDocument ( DocumentId documentId ) : void
documentId DocumentId
Результат void

CreateDocument() публичный Метод

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
Результат DocumentId

CreateFrameworkReference() публичный статический Метод

Creates a MetadataReference to a BCL assembly, with XML documentation.
public static CreateFrameworkReference ( string assemblyName ) : Microsoft.CodeAnalysis.MetadataReference
assemblyName string
Результат Microsoft.CodeAnalysis.MetadataReference

EditorWorkspace() публичный Метод

Creates an EditorWorkspace powered by the specified MEF host services.
public EditorWorkspace ( Microsoft.CodeAnalysis.Host.HostServices host ) : System
host Microsoft.CodeAnalysis.Host.HostServices
Результат System

OpenDocument() публичный Метод

Links an existing Document to an ITextBuffer, synchronizing their contents.
public OpenDocument ( DocumentId documentId, ITextBuffer buffer ) : void
documentId DocumentId
buffer ITextBuffer
Результат void