コード例 #1
0
        private async Task <bool> RaiseNotificationReceivedAsync(Notification envelope)
        {
            var eventArgs = new EnvelopeEventArgs <Notification>(envelope);

            NotificationReceived?.RaiseEvent(this, eventArgs);
            await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false);

            return(true);
        }
コード例 #2
0
        private async Task <bool> RaiseCommandReceivedAsync(Command envelope)
        {
            var eventArgs = new EnvelopeEventArgs <Command>(envelope);

            CommandReceived?.RaiseEvent(this, eventArgs);
            await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false);

            return(true);
        }
コード例 #3
0
        private async Task <bool> RaiseMessageReceivedAsync(Message envelope)
        {
            var eventArgs = new EnvelopeEventArgs <Message>(envelope);

            MessageReceived?.RaiseEvent(this, eventArgs);
            await eventArgs.WaitForDeferralsAsync().ConfigureAwait(false);

            return(true);
        }