创建建模编辑器。
命名空间: Microsoft.VisualStudio.Modeling.Shell
程序集: Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Shell.12.0.dll 中)
语法
声明
Public Function CreateEditorInstance ( _
createFlags As UInteger, _
fileName As String, _
physicalView As String, _
hierarchy As IVsHierarchy, _
itemId As UInteger, _
existingDocData As IntPtr, _
<OutAttribute> ByRef docView As IntPtr, _
<OutAttribute> ByRef docData As IntPtr, _
<OutAttribute> ByRef editorCaption As String, _
<OutAttribute> ByRef cmdUI As Guid, _
<OutAttribute> ByRef createDocWinFlags As Integer _
) As Integer
public int CreateEditorInstance(
uint createFlags,
string fileName,
string physicalView,
IVsHierarchy hierarchy,
uint itemId,
IntPtr existingDocData,
out IntPtr docView,
out IntPtr docData,
out string editorCaption,
out Guid cmdUI,
out int createDocWinFlags
)
参数
- createFlags
类型:System.UInt32
定义的建模编辑如何生成的标志。
- fileName
类型:System.String
要打开编辑的文档的名称。
- physicalView
类型:System.String
模型编辑器视图的名称。
- hierarchy
类型:Microsoft.VisualStudio.Shell.Interop.IVsHierarchy
用于包含文档项目的 IVsHierarchy。
- itemId
类型:System.UInt32
文档的 ID。
- existingDocData
类型:System.IntPtr
如果在 Visual Studio 中已打开文档,则为该文档。
- docView
类型:System.IntPtr%
文档的视图。
- docData
类型:System.IntPtr%
文档。
- editorCaption
类型:System.String%
建模编辑器的标题。
- cmdUI
类型:System.Guid%
分配给建模编辑器的 GUID。
- createDocWinFlags
类型:System.Int32%
要传递给 CreateDocumentWindow 的标志。
返回值
类型:System.Int32
模型编辑器。
实现
备注
此方法是 IVsEditorFactory 的一部分并由 Visual Studio 调用创建建模编辑器。 在必要时ModelingEditorFactory 调用 CreateDocData 和 CreateDocView。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。