public static IRule <string> CreateRules(string value)
        {
            var nameSam = new ResolveAndRunNextRule <string>(
                () => value.StartsWith("sa"),
                () => "Sam",
                new StopRule <string>("some with s")
                );

            var nameSumantha = new ResolveAndRunNextRule <string>(
                () => value.StartsWith("sum"),
                () => "Sumantha",
                new StopRule <string>("some with s")
                );

            var nameWithS = new RulesWithSubCondition <string>(new IRule <string>[] { nameSam, nameSumantha },
                                                               () => value.StartsWith("s"), () => "some with s", new StopRule <string>("some with s"));

            var ihaName = new ResolveAndRunNextRule <string>(
                () => value.StartsWith("i"),
                () => "Ishana Chaudhary", nameWithS
                );

            return(new ResolveAndRunNextRule <string>(
                       () => value.StartsWith("a"),
                       () => "atul chaudhary",
                       ihaName
                       ));
        }
        /// <summary>
        /// >10 && <=100
        /// </summary>
        /// <param name="number"></param>
        /// <returns></returns>
        private static RulesWithSubCondition <int> Between11And100(int number, IRule <int> Between101And200)
        {
            var stopAt100                = new StopRule <int>(100);
            var whenEqualTo60            = new ResolveAndRunNextRule <int>(() => number == 60, () => 60, stopAt100);
            var whenEqualTo50            = new ResolveAndRunNextRule <int>(() => number == 50, () => 50, stopAt100);
            var greaterThan10LessThan100 = new RulesWithSubCondition <int>(new IRule <int>[] { whenEqualTo50, whenEqualTo60, stopAt100 },
                                                                           () => number <= 100, () => 100, Between101And200);

            return(greaterThan10LessThan100);
        }
        private static IRule <int> Between101And200(int number)
        {
            var whenLessThan200 = new ResolveAndRunNextRule <int>(() => number > 150 && number <= 200, () => 199, new StopRule <int>(200));
            var whenLessThan150 = new ResolveAndRunNextRule <int>(() => number <= 150, () => 149, new StopRule <int>(200));

            var whenGreaterThan100LessThan200 = new RulesWithSubCondition <int>(new IRule <int>[] { whenLessThan150, whenLessThan200 },
                                                                                () => number >= 100, () => 200, new StopRule <int>(200));

            return(whenGreaterThan100LessThan200);
        }
        /// <summary>
        /// >=1 && <=10
        /// </summary>
        /// <param name="number"></param>
        /// <param name="greaterThan10LessThan100"></param>
        /// <returns></returns>
        private static RulesWithSubCondition <int> Between1And10(int number, RulesWithSubCondition <int> greaterThan10LessThan100)
        {
            var stopAt10              = new StopRule <int>(10);
            var between1And5          = new ResolveAndRunNextRule <int>(() => number >= 1 && number < 5, () => 1, stopAt10);
            var between5And9          = new ResolveAndRunNextRule <int>(() => number > 4 && number <= 9, () => 9, stopAt10);
            var return0WhenLessThan10 = new ResolveAndRunNextRule <int>(() => number <= 10, () => 10, greaterThan10LessThan100);
            var valueLessThan10Rule   = new RulesWithSubCondition <int>(new IRule <int>[] { between1And5, between5And9 }, () => number == 10, () => 10,
                                                                        return0WhenLessThan10);

            return(valueLessThan10Rule);
        }