Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Registers the provided annotation type together with the annotation.
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 does not support generic types or methods.
Type Parameters
- TAnnotation
The Type for an object that inherits from ModelAnnotation.
Parameters
- factoryMethod
Type: Microsoft.Data.Schema.SchemaModel.InstantiateAnnotationCallback<TAnnotation>
An InstantiateAnnotationCallback<TAnnotation> object that represents the method that can instantiate the annotation.
- isSerializable
Type: System.Boolean
A bool that indicates whether the annotation is serializable.
- requiresControllerLock
Type: System.Boolean
A bool that indicates whether instances of this class require a controller lock.
Return Value
Type: Microsoft.Data.Schema.SchemaModel.ModelAnnotationClass
The metadata for an annotation.
Exceptions
| Exception | Condition |
|---|---|
| ModelRegistrationException | The TAnnotation Generic parameter value has already been registered. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.