/// <summary> /// Run /// </summary> public override void Run() { EventBusPluginLoader plugins = new EventBusPluginLoader(); ThreadPool.QueueUserWorkItem(delegate { plugins = new EventBusPluginLoader(); IEnumerable <IEventBus> eventBusCollection = new List <IEventBus>() { new AzureExpensesEventBus(), new AzureVisitorsEventBus(), new AzureTravelEventBus(), new AzureVacationEventBus(), new AzureStaffEventBus(), }; plugins.Initialize(eventBusCollection); }); while (!IsStopped) { Thread.Sleep(10000); } }
/// <summary> /// OnStart /// </summary> /// <param name="args"></param> protected override void OnStart(string[] args) { TraceManager.TraceInfo("OnStart"); ThreadPool.QueueUserWorkItem(delegate { plugins = new EventBusPluginLoader(); IEnumerable <IEventBus> eventBusCollection = new List <IEventBus>() { //new AzureExpensesEventBus(), //new AzureVisitorsEventBus(), //new AzureTravelEventBus(), //new AzureVacationEventBus(), new AzureStaffEventBus(), }; plugins.Initialize(eventBusCollection); }); }