/// <summary> /// execute work completed domain event /// </summary> async Task ExecuteWorkCompletedDomainEventAsync() { var eventArray = DomainEvents.ToArray(); if (DomainEventBus.globalDomainEventManager != null) { await DomainEventBus.globalDomainEventManager.ExecutedTimeDomainEventAsync(EventTriggerTime.WorkCompleted, eventArray).ConfigureAwait(false); //execute global event handler } await DomainEventManager.ExecutedTimeDomainEventAsync(EventTriggerTime.WorkCompleted, eventArray).ConfigureAwait(false); //execute local work event handler }