Share via


CodeGeneratorRegistrationAttribute Třída

Definice

Tento atribut přidá vlastní položku registru generátoru souborů pro konkrétní typ souboru. Příklad: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators
{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\Můjgenerátor] "CLSID"="{AAAA53CC-3D4F-40a2-BD4D-4F3419755476}" "GeneratesDesignTimeSource" = d'1'

public ref class CodeGeneratorRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
public ref class CodeGeneratorRegistrationAttribute sealed : Microsoft::VisualStudio::Shell::RegistrationAttribute
[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class CodeGeneratorRegistrationAttribute : Microsoft.VisualStudio.Shell.RegistrationAttribute
[<System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)>]
type CodeGeneratorRegistrationAttribute = class
    inherit RegistrationAttribute
Public NotInheritable Class CodeGeneratorRegistrationAttribute
Inherits RegistrationAttribute
Dědičnost
CodeGeneratorRegistrationAttribute
Atributy

Poznámky

Příklad:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators\{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\MyGenerator]

"CLSID"="{AAAA53CC-3D4F-40a2-BD4D-4F3419755476}"

"GeneratesDesignTimeSource" = d'1'

Konstruktory

CodeGeneratorRegistrationAttribute(Type, String, String)

Vytvoří nový atribut CodeGeneratorRegistrationAttribute pro registraci vlastního generátoru kódu pro zadaný kontext.

Vlastnosti

ContextGuid

Získání identifikátoru GUID představujícího typ projektu

GeneratesDesignTimeSource

Získání nebo nastavení hodnoty GeneratesDesignTimeSource

GeneratesSharedDesignTimeSource

Získání nebo nastavení hodnoty GeneratesSharedDesignTimeSource

GeneratorGuid

Získání identifikátoru GUID představujícího typ generátoru

GeneratorName

Získá název generátoru.

GeneratorRegKeyName

Získá název klíče registru generátoru v části

GeneratorType

Získání typu generátoru

TypeId

Přepište vlastnost TypeID, aby odvozené třídy RegistrationAttribute fungovaly se System.ComponentModel.TypeDescriptor.GetAttributes(...). Atribut odvozený z tohoto atributu bude muset přepsat tuto vlastnost pouze v případě, že potřebuje lepší kontrolu nad instancemi, které lze použít na třídu.

(Zděděno od RegistrationAttribute)

Metody

GetPackageRegKeyPath(Guid)

Získá cestu registru (vzhledem ke kořenovému adresáři registru aplikace) VSPackage.

(Zděděno od RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Volána pro registraci tohoto atributu s daným kontextem. Kontext obsahuje umístění, kam se mají umístit registrační informace. Obsahuje také další informace, jako je zaregistrovaný typ a informace o cestě.

Unregister(RegistrationAttribute+RegistrationContext)

Zrušte registraci této přípony souboru.

Platí pro