Sdílet prostřednictvím


DataAnnotationsModelMetadataProvider.CreateMetadata Metoda

Definice

Vytvoří metadata pro zadaný model.

protected:
 override System::Web::ModelBinding::ModelMetadata ^ CreateMetadata(System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes, Type ^ containerType, Func<System::Object ^> ^ modelAccessor, Type ^ modelType, System::String ^ propertyName);
protected override System.Web.ModelBinding.ModelMetadata CreateMetadata (System.Collections.Generic.IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);
override this.CreateMetadata : seq<Attribute> * Type * Func<obj> * Type * string -> System.Web.ModelBinding.ModelMetadata
Protected Overrides Function CreateMetadata (attributes As IEnumerable(Of Attribute), containerType As Type, modelAccessor As Func(Of Object), modelType As Type, propertyName As String) As ModelMetadata

Parametry

attributes
IEnumerable<Attribute>

Atributy.

containerType
Type

Typ kontejneru, nebo null Pokud není k dispozici žádný kontejner.

modelAccessor
Func<Object>

Přistupující objekt modelu

modelType
Type

Typ modelu.

propertyName
String

Název vlastnosti, nebo null Pokud model není vlastnost.

Návraty

ModelMetadata

Metadata pro model

Platí pro