public override bool Evaluate(Vehicle vec, IFFMDynamicResolver ffmResolver, ValidationRuleInternalResults internalResult) { bool flag = false; internalResult.RuleExpression = this; foreach (RuleExpression ruleExpression in this.operands) { flag |= RuleExpression.Evaluate(vec, ruleExpression, ffmResolver, internalResult); } return(flag); }
public static bool Evaluate(Vehicle vec, RuleExpression exp, IFFMDynamicResolver ffmResolver, ValidationRuleInternalResults internalResult = null) { if (internalResult == null) { internalResult = new ValidationRuleInternalResults(); } if (exp is AndExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is OrExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is CharacteristicExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is DateExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is EcuCliqueExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is NotExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is SaLaPaExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is CountryExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is IStufeExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is IStufeXExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is EquipmentExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is ValidFromExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is ValidToExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is SiFaExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is EcuRepresentativeExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is ManufactoringDateExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is EcuVariantExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } if (exp is EcuProgrammingVariantExpression) { return(exp.Evaluate(vec, ffmResolver, internalResult)); } return(false); }