Exemplo n.º 1
0
        public void Run()
        {
            var runner = new OneSecondRunnerService <Context>();
            var ctx01  = new Context {
                Name = "Parse        dates"
            };
            var ctx02 = new Context {
                Name = "Parse catch  dates"
            };
            var ctx03 = new Context {
                Name = "TryParse     dates"
            };
            var ctx04 = new Context {
                Name = "Parse    bad dates"
            };
            var ctx05 = new Context {
                Name = "TryParse bad dates"
            };

            runner.Run(ParseDates, ctx01);
            runner.Run(ParseCatchDates, ctx02);
            runner.Run(TryParseDates, ctx03);
            runner.Run(ParseBadDates, ctx04);
            runner.Run(TryParseBadDates, ctx05);
        }
Exemplo n.º 2
0
        public void Run()
        {
            var runner = new OneSecondRunnerService <Context>();
            var ctx01  = new Context {
                Name = "Parse        numbers"
            };
            var ctx02 = new Context {
                Name = "Parse catch  numbers"
            };
            var ctx03 = new Context {
                Name = "TryParse     numbers"
            };
            var ctx04 = new Context {
                Name = "Parse    bad numbers"
            };
            var ctx05 = new Context {
                Name = "TryParse bad numbers"
            };

            runner.Run(ParseNumbers, ctx01);
            runner.Run(ParseCatchNumbers, ctx02);
            runner.Run(TryParseNumbers, ctx03);
            runner.Run(ParseBadNumbers, ctx04);
            runner.Run(TryParseBadNumbers, ctx05);
        }
Exemplo n.º 3
0
        public void Run()
        {
            var runner = new OneSecondRunnerService <Context>();
            var ctx01  = new Context {
                Name = "SnailExecutor null argument"
            };
            var ctx02 = new Context {
                Name = "SnailExecutor execute exception"
            };
            var ctx03 = new Context {
                Name = "CheetahExecutor null argument"
            };
            var ctx04 = new Context {
                Name = "CheetahExecutor execute exception"
            };
            var ctx05 = new Context {
                Name = "CheetahExecutor execute"
            };
            var ctx06 = new Context {
                Name = "2 tier SnailExecutor execute exception"
            };
            var ctx07 = new Context {
                Name = "2 tier CheetahExecutor execute exception"
            };

            runner.Run(RunNullSnail, ctx01);
            runner.Run(RunExecuteExceptionSnail, ctx02);
            runner.Run(RunNullCheetah, ctx03);
            runner.Run(RunExecuteExceptionCheetah, ctx04);
            runner.Run(RunExecuteCheetah, ctx05);
            runner.Run(RunExecuteExceptionSnail2Tier, ctx06);
            runner.Run(RunExecuteExceptionCheetah2Tier, ctx07);
        }