Exemple #1
0
        Broker Register(MessageUnit unit, Address address)
        {
            if (!units.ContainsKey(address))
            {
                units.Add(address, new List<MessageUnit>());

                unit.SetOutgoing(Outgoing);
                units[address].Add(unit);
            }

            return this;
        }
Exemple #2
0
        async Task Outgoing(TransportMessage message)
        {
            var address = message.Headers[AcceptanceTestHeaders.Destination].Parse();

            IList<MessageUnit> destinations;
            if (!units.TryGetValue(address, out destinations))
            {
                destinations = new MessageUnit[]
                {
                };
            }

            foreach (MessageUnit unit in destinations)
            {
                await unit.HandOver(message)
                    .ConfigureAwait(false);
            }
        }
Exemple #3
0
 public Broker Register(MessageUnit unit, Topic topic)
 {
     return Register(unit, (Address) topic);
 }
Exemple #4
0
 public Broker Register(MessageUnit unit)
 {
     return Register(unit, unit.Endpoint);
 }
Exemple #5
0
 public Broker Register(MessageUnit unit, Topic topic)
 {
     return(Register(unit, (Address)topic));
 }
Exemple #6
0
 public Broker Register(MessageUnit unit)
 {
     return(Register(unit, unit.Endpoint));
 }