1
0
mirror of synced 2024-11-16 14:53:50 +00:00
Tapeti/Connection/TapetiSubscriber.cs
2016-11-17 09:05:39 +01:00

26 lines
619 B
C#

using System.Collections.Generic;
namespace Tapeti.Connection
{
public class TapetiSubscriber : ISubscriber
{
private readonly TapetiWorker worker;
public TapetiSubscriber(TapetiWorker worker, IEnumerable<IMessageHandlerRegistration> registrations)
{
this.worker = worker;
ApplyTopology(registrations);
}
private void ApplyTopology(IEnumerable<IMessageHandlerRegistration> registrations)
{
foreach (var registration in registrations)
registration.ApplyTopology(worker.GetChannel());
}
}
}