Metodo ModelAnnotation.RegisterPropertyClass<TProperty>

Registra un tipo di proprietà che presenta l'annotazione.

Spazio dei nomi:  Microsoft.Data.Schema.SchemaModel
Assembly:  Microsoft.Data.Schema (in Microsoft.Data.Schema.dll)

Sintassi

'Dichiarazione
Protected Shared Function RegisterPropertyClass(Of TProperty) ( _
    annotationClass As ModelAnnotationClass, _
    propertyName As String, _
    defaultValue As TProperty _
) As ModelPropertyClass
protected static ModelPropertyClass RegisterPropertyClass<TProperty>(
    ModelAnnotationClass annotationClass,
    string propertyName,
    TProperty defaultValue
)
protected:
generic<typename TProperty>
static ModelPropertyClass^ RegisterPropertyClass(
    ModelAnnotationClass^ annotationClass, 
    String^ propertyName, 
    TProperty defaultValue
)
static member RegisterPropertyClass : 
        annotationClass:ModelAnnotationClass * 
        propertyName:string * 
        defaultValue:'TProperty -> ModelPropertyClass 
JScript non supporta i tipi o i metodi generici.

Parametri di tipo

  • TProperty
    Type del valore della proprietà.

Parametri

  • propertyName
    Tipo: System.String
    Oggetto string contenente il nome della proprietà.
  • defaultValue
    Tipo: TProperty
    Oggetto di tipo TProperty che rappresenta il valore predefinito.

Valore restituito

Tipo: Microsoft.Data.Schema.SchemaModel.ModelPropertyClass
Oggetto metadati per la proprietà registrata.

Sicurezza di .NET Framework

Vedere anche

Riferimenti

ModelAnnotation Classe

Spazio dei nomi Microsoft.Data.Schema.SchemaModel

ModelAnnotationClass