@@ -1,6 +1,10 @@
|
|||||||
namespace TimetableDesigner.Backend.Events;
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Nodes;
|
||||||
|
|
||||||
|
namespace TimetableDesigner.Backend.Events;
|
||||||
|
|
||||||
public interface IEventQueuePublisher
|
public interface IEventQueuePublisher
|
||||||
{
|
{
|
||||||
public Task PublishAsync<T>(T data) where T : class;
|
public sealed Task PublishAsync<T>(T data) where T : class => PublishAsync(JsonSerializer.Serialize(data), data.GetType());
|
||||||
|
public Task PublishAsync(string data, Type dataType);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user