private async Task <bool> RaiseNotificationReceivedAsync(Notification envelope) { var eventArgs = new EnvelopeEventArgs <Notification>(envelope); NotificationReceived?.RaiseEvent(this, eventArgs); await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false); return(true); }
private async Task <bool> RaiseCommandReceivedAsync(Command envelope) { var eventArgs = new EnvelopeEventArgs <Command>(envelope); CommandReceived?.RaiseEvent(this, eventArgs); await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false); return(true); }
private async Task <bool> RaiseMessageReceivedAsync(Message envelope) { var eventArgs = new EnvelopeEventArgs <Message>(envelope); MessageReceived?.RaiseEvent(this, eventArgs); await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false); return(true); }