public ExampleThreadWorker() { // Add methods as listeners to have information update // These listeners will be called on the main thread OnStartWorker.AddListener(ExampleStartProcess); OnUpdateWorker.AddListener(ExampleUpdateProcess); OnCloseWorker.AddListener(ExampleCloseProcess); OnErrorWorker.AddListener(ExampleErrorProcess); }
public void Execute(OnStartWorker pipelineEvent) { if (!_configuration.IsWorker) { return; } _bus.Send(new WorkerStartedEvent { InboxWorkQueueUri = _configuration.Inbox.WorkQueue.Uri.ToString(), DateStarted = DateTime.Now }, c => c.WithRecipient(_configuration.Worker.DistributorControlInboxWorkQueue)); }