protected static ModelMetadata GetTypeMetadata(Type modelType) { var provider = new GenericsModelMetadataProvider(null, ConfigurationHolder.MetadataMappings); return provider.GetMetadataForType(null, modelType); }
public void SetUp() { _damp = new DataAnnotationsModelMetadataProvider(); _gmp = new GenericsModelMetadataProvider(_damp); _reg = ConfigurationHolder.GetRootRegistrar(); }
protected static ModelMetadata GetPropertyMetadata(Type modelType, string propertyName) { var provider = new GenericsModelMetadataProvider(null, ConfigurationHolder.MetadataMappings); return provider.GetMetadataForProperty(null, modelType, propertyName); }
internal GenericsModelMetadata(GenericsModelMetadataProvider provider, Type containerType, Func<object> modelAccessor, Type modelType, string propertyName) : base(provider, containerType, modelAccessor, modelType, propertyName) { _instanceValidator = (model, operation) => new string[] { }; InstanceDescription = model => model.ToString(); }