ModelBinding\AssociatedMetadataProvider.cs (9)
13private static void ApplyMetadataAwareAttributes(IEnumerable<Attribute> attributes, ModelMetadata result) {
19protected abstract ModelMetadata CreateMetadata(IEnumerable<Attribute> attributes, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName);
25public override IEnumerable<ModelMetadata> GetMetadataForProperties(object container, Type containerType) {
33private IEnumerable<ModelMetadata> GetMetadataForPropertiesImpl(object container, Type containerType) {
40public override ModelMetadata GetMetadataForProperty(Func<object> modelAccessor, Type containerType, string propertyName) {
61protected virtual ModelMetadata GetMetadataForProperty(Func<object> modelAccessor, Type containerType, PropertyDescriptor propertyDescriptor) {
63ModelMetadata result = CreateMetadata(attributes, containerType, modelAccessor, propertyDescriptor.PropertyType, propertyDescriptor.Name);
68public override ModelMetadata GetMetadataForType(Func<object> modelAccessor, Type modelType) {
74ModelMetadata result = CreateMetadata(attributes, null /* containerType */, modelAccessor, modelType, null /* propertyName */);
ModelBinding\DataAnnotationsModelValidatorProvider.cs (9)
13public delegate ModelValidator DataAnnotationsModelValidationFactory(ModelMetadata metadata, ModelBindingExecutionContext context, ValidationAttribute attribute);
16public delegate ModelValidator DataAnnotationsValidatableObjectAdapterFactory(ModelMetadata metadata, ModelBindingExecutionContext context);
79protected override IEnumerable<ModelValidator> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context, IEnumerable<Attribute> attributes) {
167ConstructorInfo constructor = adapterType.GetConstructor(new[] { typeof(ModelMetadata), typeof(ModelBindingExecutionContext), attributeType });
174typeof(ModelMetadata).FullName,
232/// which takes two parameters of types <see cref="ModelMetadata"/> and
274/// which takes two parameters of types <see cref="ModelMetadata"/> and
297ConstructorInfo constructor = adapterType.GetConstructor(new[] { typeof(ModelMetadata), typeof(ModelBindingExecutionContext) });
304typeof(ModelMetadata).FullName,