public RuleException(BrokenRule rule) : base(rule.Message) { if (rule == null) { throw new ArgumentNullException("rule"); } this.Rule = rule; }
public int Append(BrokenRule rule) { if (rule == null || rule.Fields == null) { return(0); } // Seleciona campos nao existentes var fields = from i in rule.Fields where this.Fields.Any(f => string.Equals(i.Name, f.Name, StringComparison.InvariantCultureIgnoreCase)) select i; this.Fields.AddRange(fields); return(fields.Count()); }
public RuleException(string message, BrokenRule rule) : base(message) { if (rule == null) { throw new ArgumentNullException("rule"); } if (string.IsNullOrWhiteSpace(message)) { message = rule.Message; } rule.Message = message; this.Rule = rule; }
public RuleException(string message, Exception innerException, BrokenRule rule) : base(message, innerException) { }