Udostępnij przez


CodeGeneratorRegistrationAttribute Klasa

Definicja

Ten atrybut dodaje wpis rejestru generatora plików niestandardowych dla określonego typu pliku. Na przykład: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\Generators
{fae04ec1-301f-11d3-bf4b-00c04f79efbc}\MyGenerator] "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
Dziedziczenie
CodeGeneratorRegistrationAttribute
Atrybuty

Uwagi

Na przykład:

[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)

Tworzy nowy atrybut CodeGeneratorRegistrationAttribute w celu zarejestrowania niestandardowego generatora kodu dla podanego kontekstu.

Właściwości

ContextGuid

Pobieranie identyfikatora GUID reprezentującego typ projektu

GeneratesDesignTimeSource

Pobieranie lub ustawianie wartości GeneratesDesignTimeSource

GeneratesSharedDesignTimeSource

Pobierz lub ustaw wartość GeneratesSharedDesignTimeSource

GeneratorGuid

Pobieranie identyfikatora GUID reprezentującego typ generatora

GeneratorName

Pobiera nazwę generatora

GeneratorRegKeyName

Pobiera nazwę klucza reg generatora w obszarze

GeneratorType

Pobieranie typu generatora

TypeId

Zastąp właściwość TypeID, aby umożliwić klasom pochodnym RegistrationAttribute pracować z atrybutem System.ComponentModel.TypeDescriptor.GetAttributes(...). Atrybut pochodzący z tego atrybutu będzie musiał zastąpić tę właściwość tylko wtedy, gdy potrzebuje lepszej kontroli nad wystąpieniami, które można zastosować do klasy.

(Odziedziczone po RegistrationAttribute)

Metody

GetPackageRegKeyPath(Guid)

Pobiera ścieżkę rejestru (względem katalogu głównego rejestru aplikacji) pakietu VSPackage.

(Odziedziczone po RegistrationAttribute)
Register(RegistrationAttribute+RegistrationContext)

Wywoływana w celu zarejestrowania tego atrybutu w danym kontekście. Kontekst zawiera lokalizację, w której należy umieścić informacje o rejestracji. Zawiera również inne informacje, takie jak typ zarejestrowany i informacje o ścieżce.

Unregister(RegistrationAttribute+RegistrationContext)

Wyrejestruj to rozszerzenie pliku.

Dotyczy