Class EditorService
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
editorFactoriesIEditorFactory[]Imported editor factories.
Methods
GetEditor(IProjectItem, IScriptShell)
Gets the editor over its IEditorFactory.
public IProjectItemDocument GetEditor(IProjectItem item, IScriptShell parentShell)
  Parameters
itemIProjectItemProject item with.
parentShellIScriptShellShell where the editor belongs to.
Returns
- IProjectItemDocument
 IProjectItemDocument as editor for the IProjectItem.
Exceptions
- InvalidOperationException
 Thrown when no IEditorFactory is found.
- ArgumentNullException
 Thrown when
itemorparentShellis null.
HasEditor(IProjectItem)
Gets an value indicating whether there is an editor factory for the item.
public bool HasEditor(IProjectItem item)
  Parameters
itemIProjectItemItem to check.
Returns
- bool
 True if this project item has an editor.
Exceptions
- ArgumentNullException
 Thrown when
itemis null.