Método ModelAnnotation.RegisterAnnotationClass<TAnnotation>

Registra o tipo de anotação fornecido juntamente com a anotação.

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

Sintaxe

'Declaração
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
O JScript não oferece suporte a tipos ou métodos genéricos.

Parâmetros de tipo

Parâmetros

  • isSerializable
    Tipo: System.Boolean
    A bool indica se a anotação é serializável.
  • requiresControllerLock
    Tipo: System.Boolean
    A bool que indica se as instâncias dessa classe requerem um bloqueio do controlador.

Valor de retorno

Tipo: Microsoft.Data.Schema.SchemaModel.ModelAnnotationClass
Os metadados para uma anotação.

Exceções

Exceção Condição
ModelRegistrationException

O TAnnotation o valor de parâmetro genérico já foi registrado.

Segurança do .NET Framework

Consulte também

Referência

ModelAnnotation Classe

Namespace Microsoft.Data.Schema.SchemaModel

InstantiateAnnotationCallback<TAnnotation>