Example #1
0
 public ChannelManager()
 {
     _requestResponseHandler = new RequestResponseHandler();
     _consumerChannels       = new IdLookup <IChannel>();
     _producerChannels       = new IdLookup <IChannel>();
     _incoming = new EnumLookup <BaseCommand.Type, Action <BaseCommand> >(cmd => _requestResponseHandler.Incoming(cmd));
     _incoming.Set(BaseCommand.Type.CloseConsumer, cmd => Incoming(cmd.CloseConsumer));
     _incoming.Set(BaseCommand.Type.CloseProducer, cmd => Incoming(cmd.CloseProducer));
     _incoming.Set(BaseCommand.Type.ActiveConsumerChange, cmd => Incoming(cmd.ActiveConsumerChange));
     _incoming.Set(BaseCommand.Type.ReachedEndOfTopic, cmd => Incoming(cmd.ReachedEndOfTopic));
 }
 public ChannelManager()
 {
     _consumerChannels = new IdLookup <IChannel>();
     _producerChannels = new IdLookup <IChannel>();
 }