private bool validate(AgeConfig ageconfig) { return((member.Age >= ageconfig.Min && member.Age <= ageconfig.Max) || (member.Age >= ageconfig.Min && ageconfig.Max == 0)); }
public double Execute() { AgeConfig config = ruleConfig.AgeRule.Where(validate).SingleOrDefault(); return(config != null ? config.Percent : 0); }