Share via


SingleFileGeneratorSupportRegistrationAttribute 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
[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
Dědičnost
SingleFileGeneratorSupportRegistrationAttribute
Atributy

Poznámky

Projekt zodpovídá za vytvoření klíče ProjectTypeGuid. Klienti konkrétních typů souborů, kteří implementují skutečný generátor s jedním souborem, pak zodpovídají za registraci generátorů jednotlivých souborů pod podklíčem projektu klíče "Generators". Klienti, kteří implementují konkrétní generátor jediného souboru, používají pro tento účel .CodeGeneratorRegistrationAttribute

Konstruktory

SingleFileGeneratorSupportRegistrationAttribute(Type)

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

Vlastnosti

ProjectFactoryGuid

Získání identifikátoru GUID představujícího typ 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