1
0
mirror of synced 2024-11-05 02:59:16 +00: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);
}
}
}