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
- TAnnotation
Type , Devralan bir nesne için ModelAnnotation.
Parametreler
- factoryMethod
Tür: Microsoft.Data.Schema.SchemaModel.InstantiateAnnotationCallback<TAnnotation>
Bir InstantiateAnnotationCallback<TAnnotation> nesnesini temsil eden yöntemi, örneğini oluşturabilirsiniz ek açıklama.
- 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
- Anında arayanlar için tam güven. Bu üye kısmen güvenilen kodla kullanılamaz. Daha fazla bilgi için bkz. kısmen güvenilir kod tarafından Kitaplıklar kullanma.