private bool anySubRulesBrokenForCriteria(Func <IBusinessRule, bool> specification) { var businessRuleSet = new BusinessRuleSet(_underlyingRules.Where(specification)); Description = businessRuleSet.Message; return(businessRuleSet.IsEmpty); }
public ReportConfiguration() { Rules = new BusinessRuleSet(AllRules.All()); Verbose = false; Author = EnvironmentHelper.UserName(); Font = ReportFont.Default; OpenReportAfterCreation = true; NumberOfCompilations = 3; }
public Curve() { Id = ShortGuid.NewGuid(); _name = string.Empty; _description = string.Empty; _xData = null; _yData = null; CurveOptions = new CurveOptions(); Rules = new BusinessRuleSet(); }
public ParameterRange() { Rules = new BusinessRuleSet(); Rules.Add(AllRules.MinLessThanMax); Rules.Add(AllRules.MaxGreaterThanMin); Rules.Add(AllRules.MinGreaterThanDbMin); Rules.Add(AllRules.MaxLessThanDbMax); Rules.Add(AllRules.MinLessThanDbMax); Rules.Add(AllRules.MaxGreaterThanDbMin); }
protected override void Context() { sut = new BusinessRuleSet( ObjectWithRules.AllRules.GreaterThanZero, ObjectWithRules.AllRules.SmallerThanOneThousand); _objectWithRules = new ObjectWithRules(sut) { Name = string.Empty, Value = 500 }; invalidValue = 1100; }
protected virtual void ValidateBusinessRules(TEntity entity) { if (BusinessRuleSet != null) { var businessRules = BusinessRuleSet.ExecuteRules(entity, null); if (businessRules.Any(x => x.IsFailed)) { // Give messages on every rule that failed throw new BusinessRuleException("BussinessGenericErrorMessageKey", businessRules.Where(x => x.IsFailed).ToArray()); } } }
protected override void Context() { sut = new BusinessRuleSet( ObjectWithRules.AllRules.GreaterThanZero, ObjectWithRules.AllRules.SmallerThanOneThousand, DerivedObjectWithRules.OtherRules.AnotherRuleToAdd ); _derivedObjectWithRules = new DerivedObjectWithRules(sut) { Name = string.Empty, Value = 1100 }; }
protected PopulationAnalysisFieldBase(Type dataType) { DataType = dataType; Rules = new BusinessRuleSet(AllRules.All); }
protected override void Context() { sut = new BusinessRuleSet(); }
public DisplayUnitMap() { Rules = new BusinessRuleSet(AllRules.All()); }