ProvideEditorExtensionAttribute.Register 方法
调用注册特定上下文的此属性。 上下文包含应将注册信息的位置。 它还包含类型注册和路径信息。
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Public Overrides Sub Register ( _
context As RegistrationAttribute.RegistrationContext _
)
public override void Register(
RegistrationAttribute.RegistrationContext context
)
参数
- context
类型:Microsoft.VisualStudio.Shell.RegistrationAttribute.RegistrationContext
外部注册工具提供的寄存器上下文。上下文可用于创建注册表项,记录注册事件,并获取有关注册的元素的信息。
异常
异常 | 条件 |
---|---|
ArgumentNullException | ,如果 context 参数为空,则此方法引发 ArgumentNullException 。 |
备注
提供有关 VSPackage 中注册信息,在调用由外部注册工具 (如 RegPkg.exe。
实现 RegisterEditorExtensionAttribute 类的 Vspackage 不需要调用 Register 方法。 Register 由注册工具调用。
以下注册表项由 ProvideEditorExtensionAttribute创建的:
VSROOT\Editors \{} FactoryGuid\Extensions \扩展 = 优先级
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。