예제 #1
0
 protected static ModelMetadata GetTypeMetadata(Type modelType)
 {
     var provider = new GenericsModelMetadataProvider(null, ConfigurationHolder.MetadataMappings);
     return provider.GetMetadataForType(null, modelType);
 }
예제 #2
0
 public void SetUp()
 {
     _damp = new DataAnnotationsModelMetadataProvider();
     _gmp = new GenericsModelMetadataProvider(_damp);
     _reg = ConfigurationHolder.GetRootRegistrar();
 }
예제 #3
0
 protected static ModelMetadata GetPropertyMetadata(Type modelType, string propertyName)
 {
     var provider = new GenericsModelMetadataProvider(null, ConfigurationHolder.MetadataMappings);
     return provider.GetMetadataForProperty(null, modelType, propertyName);
 }
예제 #4
0
 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();
 }