Esempio n. 1
0
        public static void Main(string[] args)
        {
            var ws = new WindowsService();            

            var command = new RootCommand(ws.Console);
            var engine = new CommandEngine(command);
            ws.Start(args);
            engine.Run(args);
        }
Esempio n. 2
0
 public static void Main(string[] args)
 {
     //LoadedAssembly();
     if (args.Length == 0) SwitchDomainForRazorEngine();
     var console = new ClientConsole();
     var command = new RootCommand(console);
     var razorcmd=new RazorCommand();
     command.RegisterCommand(razorcmd);
     command.RegisterCommand(new TestCaseCommand(razorcmd));
     var commandEngine = new CommandEngine(command);
     commandEngine.Run(args);
 }
Esempio n. 3
0
        private static void Main(string[] args)
        {
            var console = new ClientConsole();
            //var console = new VoiceConsole();
            //var console = new ServerConsole(string.Empty);

            var command = new RootCommand(console);
            command.RegisterCommand(new SomeContainerCommand());
            command.RegisterCommand(new EngineContainerCommand());
            command.RegisterCommand(new MathContainerCommand());
            command.RegisterCommand(new StatusCommand());
            command.RegisterCommand(new ParametersCommand());

            var commandEngine = new CommandEngine(command)
            {
                SplashScreen = _splashscreen
            };

            commandEngine.Run(args);
        }
        private static void Main(string[] args)
        {
            var console = new ClientConsole();
            Effort.Provider.EffortProviderConfiguration.RegisterProvider();
            var connection = DbConnectionFactory.CreateTransient();

            using (var context = new SampleDb(connection, "geo"))
            {
                console.WriteLine("Welcome to EF Test Console, type help to check available commands",
                    OutputLevel.Information, null);

                context.Products.AddRange(new[]
                {
                    new Product {Name = "CocaCola"},
                    new Product {Name = "Pepsi"},
                    new Product {Name = "Starbucks"},
                    new Product {Name = "Donut"}
                });

                context.SaveChanges();

                var ct = new System.Threading.CancellationToken();
                Task.Run(() => { SingletonSampleJob.Instance.RunBackgroundWork(ct); }, ct);

                var command = new RootCommand(console);

                command.RegisterCommand(new FillOrderCommand(context));
                command.RegisterCommand(new EditOrder(context));
                command.RegisterCommand(new QueryAuditTrail(context));
                command.RegisterCommand(new QueryOrder(context));
                command.RegisterCommand(new ToggleController(context));
                command.RegisterCommand(new JobController(context));

                var commandEngine = new CommandEngine(command);

                commandEngine.Run(args);
            }
        }