1
0
mirror of synced 2024-11-24 11:43:12 +01:00
Tapeti/Connection/TapetiPublisher.cs

23 lines
451 B
C#

using System;
using System.Threading.Tasks;
namespace Tapeti.Connection
{
public class TapetiPublisher : IPublisher
{
private readonly Func<TapetiWorker> workerFactory;
public TapetiPublisher(Func<TapetiWorker> workerFactory)
{
this.workerFactory = workerFactory;
}
public Task Publish(object message)
{
return workerFactory().Publish(message);
}
}
}