Esempio n. 1
0
 private bool validate(AgeConfig ageconfig)
 {
     return((member.Age >= ageconfig.Min && member.Age <= ageconfig.Max) ||
            (member.Age >= ageconfig.Min && ageconfig.Max == 0));
 }
Esempio n. 2
0
        public double Execute()
        {
            AgeConfig config = ruleConfig.AgeRule.Where(validate).SingleOrDefault();

            return(config != null ? config.Percent : 0);
        }