ModelMetadataIdentity Struct¶
Summary¶
A key type which identifies a [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata](Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.yml).
Methods¶
-
ForProperty
(System.Type, System.String, System.Type)¶ Creates a [Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity](Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.yml) for the provided property.
Arguments: - modelType (System.Type) – The model type.
- name (System.String) – The name of the property.
- containerType (System.Type) – The container type of the model property.
Return type: Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
Returns: A [Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity](Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.yml).
public static ModelMetadataIdentity ForProperty(Type modelType, string name, Type containerType)
-
ForType
(System.Type)¶ Creates a [Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity](Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.yml) for the provided model [System.Type]().
Arguments: - modelType (System.Type) – The model [System.Type]().
Return type: Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity
Returns: A [Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity](Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataIdentity.yml).
public static ModelMetadataIdentity ForType(Type modelType)
-
Properties¶
-
ContainerType
()¶ Gets the [System.Type]() defining the model property respresented by the current instance, or <c>null</c> if the current instance does not represent a property.
Return type: System.Type public Type ContainerType { get; }
-
MetadataKind
()¶ Gets a value indicating the kind of metadata represented by the current instance.
Return type: Microsoft.AspNet.Mvc.ModelBinding.Metadata.ModelMetadataKind public ModelMetadataKind MetadataKind { get; }
-
ModelType
()¶ Gets the [System.Type]() represented by the current instance.
Return type: System.Type public Type ModelType { get; }
-
Name
()¶ Gets the name of the current instance if it represents a parameter or property, or <c>null</c> if the current instance represents a type.
Return type: System.String public string Name { get; }
-