1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Connection/TapetiSubscriber.cs

24 lines
551 B
C#
Raw Normal View History

using System.Collections.Generic;
using System.Linq;
2016-11-17 16:33:27 +00:00
using System.Threading.Tasks;
namespace Tapeti.Connection
{
public class TapetiSubscriber : ISubscriber
{
private readonly TapetiWorker worker;
public TapetiSubscriber(TapetiWorker worker)
{
this.worker = worker;
}
public async Task BindQueues(IEnumerable<IQueueRegistration> registrations)
{
await Task.WhenAll(registrations.Select(registration => worker.Subscribe(registration)).ToList());
}
}
}