AssociatedMetadataProvider.CreateMetadata Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, creates metadata for a model.
protected:
abstract System::Web::ModelBinding::ModelMetadata ^ CreateMetadata(System::Collections::Generic::IEnumerable<Attribute ^> ^ attributes, Type ^ containerType, Func<System::Object ^> ^ modelAccessor, Type ^ modelType, System::String ^ propertyName);
protected abstract System.Web.ModelBinding.ModelMetadata CreateMetadata (System.Collections.Generic.IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);
abstract member CreateMetadata : seq<Attribute> * Type * Func<obj> * Type * string -> System.Web.ModelBinding.ModelMetadata
Protected MustOverride Function CreateMetadata (attributes As IEnumerable(Of Attribute), containerType As Type, modelAccessor As Func(Of Object), modelType As Type, propertyName As String) As ModelMetadata
Parameters
- attributes
- IEnumerable<Attribute>
The attributes.
- containerType
- Type
The type of the container, or null
if there is no container.
- modelType
- Type
The type of the model.
- propertyName
- String
The name of the property, or null
if the model is not a property.
Returns
Metadata for a model.
Applies to
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.