You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- // MessageReceivedHandler.cs
-
- using System;
- using MediatR;
- using MediatRSample.Notifications;
-
- namespace MediatRSample;
-
- public class MessageReceivedHandler : INotificationHandler<MessageReceivedNotification>
- {
- public async Task Handle(MessageReceivedNotification notification, CancellationToken cancellationToken)
- {
- Console.WriteLine($"MediatR works! (Received a message by {notification.Message.Author.Username})");
-
- // Your implementation
- }
- }
|