17 lines
580 B
C#
17 lines
580 B
C#
|
|
// Copyright (c) The Geekeey Authors
|
||
|
|
// SPDX-License-Identifier: EUPL-1.2
|
||
|
|
|
||
|
|
namespace Geekeey.Request.Dispatcher.Tests;
|
||
|
|
|
||
|
|
public class OtherNotificationPublisher(NotificationTestTracker tracker) : INotificationPublisher
|
||
|
|
{
|
||
|
|
public async Task PublishAsync<TNotification>(IEnumerable<INotificationHandler<TNotification>> handlers, TNotification notification, CancellationToken cancellationToken) where TNotification : INotification
|
||
|
|
{
|
||
|
|
tracker.Log.Add("OtherPublisher");
|
||
|
|
|
||
|
|
foreach (var handler in handlers)
|
||
|
|
{
|
||
|
|
await handler.HandleAsync(notification, cancellationToken);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|