Exemple #1
0
        public bool Invalidate(PropertyInfo property, object instance, bool verifyDependance = true)
        {
            object value   = property.GetValue(instance);
            bool   invalid = GetDelegate(property)(value) != Negative;

            if (Dependance != null && verifyDependance)
            {
                bool dependanceInvalid = !ValidationLogic.Validate(property.DeclaringType, Dependance, instance, false);
                return(invalid && dependanceInvalid);
            }
            return(invalid);
        }
 static Dictionary <PropertyInfo, InvalidationAttribute[]> GetAttributeDictionnary()
 {
     return(ValidationLogic.GetAttributeDictionnary(typeof(M)));
 }