18 references to ModelType
System.Web (18)
ModelBinding\AssociatedValidatorProvider.cs (1)
46
return GetValidators(metadata, context, GetTypeDescriptor(metadata.
ModelType
).GetAttributes().Cast<Attribute>());
ModelBinding\CollectionModelBinderUtil.cs (4)
78
if (!modelMetadata.
ModelType
.IsGenericType || modelMetadata.
ModelType
.IsGenericTypeDefinition) {
83
Type[] modelTypeArguments = modelMetadata.
ModelType
.GetGenericArguments();
95
if (modelMetadata.
ModelType
.IsAssignableFrom(closedNewInstanceType)) {
ModelBinding\DataAnnotationsModelMetadata.cs (2)
20
PropertyInfo displayColumnProperty =
ModelType
.GetProperty(_displayColumnAttribute.DisplayColumn, BindingFlags.Public | BindingFlags.IgnoreCase | BindingFlags.Instance);
21
ValidateDisplayColumnAttribute(_displayColumnAttribute, displayColumnProperty,
ModelType
);
ModelBinding\DataAnnotationsModelValidator.cs (1)
80
memberName = Metadata.PropertyName ?? Metadata.
ModelType
.Name;
ModelBinding\DataAnnotationsModelValidatorProvider.cs (2)
103
if (typeof(IValidatableObject).IsAssignableFrom(metadata.
ModelType
)) {
105
if (!ValidatableFactories.TryGetValue(metadata.
ModelType
, out factory)) {
ModelBinding\ModelBindingContext.cs (1)
99
return ModelMetadata.
ModelType
;
ModelBinding\ModelMetadata.cs (5)
101
return !(TypeDescriptor.GetConverter(
ModelType
).CanConvertFrom(typeof(string)));
107
return TypeHelpers.IsNullableValueType(
ModelType
);
184
_realModelType =
ModelType
;
188
if (Model != null && !TypeHelpers.IsNullableValueType(
ModelType
)) {
370
return DisplayName ?? PropertyName ??
ModelType
.Name;
ModelBinding\ModelValidationNode.cs (1)
140
ModelMetadata updatedMetadata = ModelMetadataProviders.Current.GetMetadataForType(() => model, ModelMetadata.
ModelType
);
ModelBinding\MutableObjectModelBinder.cs (1)
46
return (!propertyMetadata.IsReadOnly || CanUpdateReadOnlyProperty(propertyMetadata.
ModelType
));