Aracılığıyla paylaş


ModelAnnotation.RegisterAnnotationClass<TAnnotation> Yöntem

Ek açıklama ile birlikte sağlanan eklenti tipi kaydeder.

Ad alanı:  Microsoft.Data.Schema.SchemaModel
Derleme:  Microsoft.Data.Schema (Microsoft.Data.Schema.dll içinde)

Sözdizimi

'Bildirim
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 genel türleri veya yöntemleri desteklemez.

Tür Parametreleri

Parametreler

  • isSerializable
    Tür: System.Boolean
    A bool ek açıklama seri hale getirilebilir olup olmadığını gösterir.
  • requiresControllerLock
    Tür: System.Boolean
    A bool gösterir olup olmadığını bu sınıfın örnekleri gerektiren bir denetleyici kilit.

Dönüş Değeri

Tür: Microsoft.Data.Schema.SchemaModel.ModelAnnotationClass
Ek açıklama meta verileri.

Özel Durumlar

Exception Koşul
ModelRegistrationException

TAnnotation Genel parametre değeri zaten kayıtlı olup.

.NET Framework Güvenliği

Ayrıca bkz.

Başvuru

ModelAnnotation Sınıf

Microsoft.Data.Schema.SchemaModel Ad Alanı

InstantiateAnnotationCallback<TAnnotation>