protected static void CheckRule(IModelStateRule rule) { if (rule.IsBroken()) { throw new ModelStateValidationException(rule); } }
public ModelStateValidationException(IModelStateRule brokenRule) : base(brokenRule.Message) { BrokenRule = brokenRule; }