ModelAnnotation.RegisterAnnotationClass<TAnnotation>-Methode

Registriert den bereitgestellten Anmerkungstyp zusammen mit der Anmerkung.

Namespace:  Microsoft.Data.Schema.SchemaModel
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Syntax

'Declaration
Protected Shared Function RegisterAnnotationClass(Of TAnnotation As ModelAnnotation) ( _
    factoryMethod As InstantiateAnnotationCallback(Of TAnnotation), _
    isSerializable As Boolean, _
    requiresControllerLock As Boolean _
) As ModelAnnotationClass
protected static ModelAnnotationClass RegisterAnnotationClass<TAnnotation>(
    InstantiateAnnotationCallback<TAnnotation> factoryMethod,
    bool isSerializable,
    bool requiresControllerLock
)
where TAnnotation : ModelAnnotation
protected:
generic<typename TAnnotation>
where TAnnotation : ModelAnnotation
static ModelAnnotationClass^ RegisterAnnotationClass(
    InstantiateAnnotationCallback<TAnnotation>^ factoryMethod, 
    bool isSerializable, 
    bool requiresControllerLock
)
static member RegisterAnnotationClass : 
        factoryMethod:InstantiateAnnotationCallback<'TAnnotation> * 
        isSerializable:bool * 
        requiresControllerLock:bool -> ModelAnnotationClass  when 'TAnnotation : ModelAnnotation
JScript unterstützt keine generischen Typen oder Methoden.

Typparameter

Parameter

  • isSerializable
    Typ: System.Boolean
    Ein bool-Wert, der angibt, ob die Anmerkung serialisierbar ist.
  • requiresControllerLock
    Typ: System.Boolean
    Ein bool-Wert, der angibt, ob für Instanzen dieser Klasse eine Controller-Sperre erforderlich ist.

Rückgabewert

Typ: Microsoft.Data.Schema.SchemaModel.ModelAnnotationClass
Die Metadaten für eine Anmerkung.

Ausnahmen

Ausnahme Bedingung
ModelRegistrationException

Der generische TAnnotation-Parameterwert wurde bereits registriert.

.NET Framework-Sicherheit

Siehe auch

Referenz

ModelAnnotation Klasse

Microsoft.Data.Schema.SchemaModel-Namespace

InstantiateAnnotationCallback<TAnnotation>