Ejemplo n.º 1
0
        public static ValidationNotification ValidateProperty <T>(T instance, Expression <Func <T, object> > property)
        {
            var context = new TContext();
            var prop    = new PropertyValidator <T, object>(property);

            return(ValidationCatalog.ValidateProperty(instance, prop.PropertyInfo.Name, null, context.SpecificationContainer));
        }
Ejemplo n.º 2
0
        public static ValidationNotification ValidateProperty(object instance, string propertyName,
                                                              SpecificationBase specificationBase)
        {
            var context = new TContext();

            return(ValidationCatalog.ValidateProperty(instance, propertyName, specificationBase, context.SpecificationContainer));
        }