У меня такая иерархия
class Notification : INotification
{
public string Message { get; set; }
}
class Notification1 : Notification
{
public int Count { get; set; }
}
class Notification2 : Notification
{
public string Detailes { get; set; }
}
возможно ли, чтобы такие уведомления обрабатывались одним обработчиком, который будет обрабатывать все дочерние запросы
public class CommandHandler : INotificationHandler
{
//universal handler
public Task Handle(Notification notification)
{
//serialization and logging, don't care what body will command have
}
}
Подробнее здесь: https://stackoverflow.com/questions/791 ... in-mediatr