示例#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);
 }
 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();
 }