1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Tapeti.Saga/SagaExtensions.cs
2016-12-14 20:28:17 +01:00

17 lines
432 B
C#

using System.Threading.Tasks;
using RabbitMQ.Client.Framing;
namespace Tapeti.Saga
{
public static class SagaExtensions
{
public static Task Publish<T>(this IPublisher publisher, object message, ISaga<T> saga) where T : class
{
return ((IAdvancedPublisher)publisher).Publish(message, new BasicProperties
{
CorrelationId = saga.Id
});
}
}
}