SingleFileGeneratorSupportRegistrationAttribute 类

定义

此属性为特定文件类型添加自定义文件生成器注册表项。 例如:[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators
[proj_fac_guid]

public ref class SingleFileGeneratorSupportRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class SingleFileGeneratorSupportRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)]
public sealed class SingleFileGeneratorSupportRegistrationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=false, Inherited=true)>]
type SingleFileGeneratorSupportRegistrationAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class SingleFileGeneratorSupportRegistrationAttribute
Inherits RegistrationAttribute
继承
SingleFileGeneratorSupportRegistrationAttribute
属性

注解

项目负责确保创建 ProjectTypeGuid 密钥。 然后,实现实际单一文件生成器的特定文件类型的客户端负责在项目的“生成器”密钥子项下注册其单个文件生成器。 实现特定单一文件生成器的客户端使用 CodeGeneratorRegistrationAttribute 来实现此目的。

构造函数

SingleFileGeneratorSupportRegistrationAttribute(Type)

创建新的 SingleFileGeneratorSupportRegistrationAttribute 属性,以便为提供的上下文注册自定义代码生成器。

属性

ProjectFactoryGuid

获取表示生成器类型的 Guid

TypeId

重写 TypeID 属性,以便让 RegistrationAttribute 派生类与 System.ComponentModel.TypeDescriptor.GetAttributes 一起使用 (...) 。仅当派生自此属性的属性需要对可应用于类的实例使用更好的控件时,它才必须重写此属性。

(继承自 RegistrationAttribute)

方法

GetPackageRegKeyPath(Guid)

获取相对于 VSPackage 的应用程序) 注册表根目录 (注册表路径。

(继承自 RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

调用以便向给定的上下文注册此属性。 上下文包含应放置注册信息的位置。 它还包含其他信息,例如正在注册的类型和路径信息。

Unregister(RegistrationAttribute+RegistrationContext)

取消注册此文件扩展名。

适用于