Table of Contents

Class EditorService

Namespace
Loehnert.Lisrt.Scripting.Editor
Assembly
Loehnert.Lisrt.Scripting.dll

Service for getting an IProjectItemDocument as editor.

[Export(typeof(IEditorService))]
public class EditorService : IEditorService
Inheritance
EditorService
Implements
Inherited Members

Remarks

This service depends on the extension of the Name.

Constructors

EditorService(IEditorFactory[])

Initializes a new instance of the EditorService class.

[ImportingConstructor]
public EditorService(IEditorFactory[] editorFactories)

Parameters

editorFactories IEditorFactory[]

Imported editor factories.

Methods

GetEditor(IProjectItem, IScriptShell)

Gets the editor over its IEditorFactory.

public IProjectItemDocument GetEditor(IProjectItem item, IScriptShell parentShell)

Parameters

item IProjectItem

Project item with.

parentShell IScriptShell

Shell where the editor belongs to.

Returns

IProjectItemDocument

IProjectItemDocument as editor for the IProjectItem.

Exceptions

InvalidOperationException

Thrown when no IEditorFactory is found.

ArgumentNullException

Thrown when item or parentShell is null.

HasEditor(IProjectItem)

Gets an value indicating whether there is an editor factory for the item.

public bool HasEditor(IProjectItem item)

Parameters

item IProjectItem

Item to check.

Returns

bool

True if this project item has an editor.

Exceptions

ArgumentNullException

Thrown when item is null.