示例#1
0
        public async Task DeleteAsync(string userId)
        {
            Console.WriteLine($"Deleting user {userId}..");

            await _mediator.NotifyAsync(this, new UserDeletionEvent { UserId = userId });
        }
        public async Task CompleteOrderAsync(string userId, string orderId)
        {
            Console.WriteLine($"Order {orderId} completed.");

            await _mediator.NotifyAsync(this, new OrderCompletionEvent { UserId = userId });
        }