コード例 #1
0
        protected override void OnStart(string[] args)
        {
            var servicesSetup = new ServicesSetup();

            servicesSetup.Setup();

            var serviceProvider = servicesSetup.GetServiceProvider();

            _queueProcessor = serviceProvider.GetService <QueueProcessor>();

            _queueProcessor.Start();
        }
コード例 #2
0
ファイル: ConsoleRunner.cs プロジェクト: kpocza/thriot
        internal void Run()
        {
            AllocConsole();

            var servicesSetup = new ServicesSetup();

            servicesSetup.Setup();

            var serviceProvider = servicesSetup.GetServiceProvider();
            var queueProcessor  = serviceProvider.GetService <QueueProcessor>();

            queueProcessor.Start();

            Console.WriteLine("Started");
            Console.ReadLine();

            queueProcessor.Stop();
        }