public void Register(IPollableEventSource publisher)
        {
            sourcesByStreamType.TryAdd(publisher.SourceName, (version, name) => publisher.PollEvents(version, name));
            if (publisher is IOcassionallyConnectedSourceConsumer)
            {
                var consumer = publisher as IOcassionallyConnectedSourceConsumer;

                this.ocassionallyConnectedSourcesByConsumer.TryAdd(consumer.ConsumerName, new ConcurrentDictionary<string, IOcassionallyConnectedSourceConsumer>());
                this.ocassionallyConnectedSourcesByConsumer[consumer.ConsumerName].TryAdd(consumer.SourceName, consumer);
            }
        }
        public void Register(IPollableEventSource publisher)
        {
            sourcesByStreamType.TryAdd(publisher.SourceName, (version, name) => publisher.PollEvents(version, name));
            if (publisher is IOcassionallyConnectedSourceConsumer)
            {
                var consumer = publisher as IOcassionallyConnectedSourceConsumer;

                this.ocassionallyConnectedSourcesByConsumer.TryAdd(consumer.ConsumerName, new ConcurrentDictionary <string, IOcassionallyConnectedSourceConsumer>());
                this.ocassionallyConnectedSourcesByConsumer[consumer.ConsumerName].TryAdd(consumer.SourceName, consumer);
            }
        }
示例#3
0
 public void Register(IPollableEventSource publisher)
 {
     sourcesByStreamType.TryAdd(publisher.SourceName, (version, name) => publisher.PollEvents(version, name));
 }
示例#4
0
 public EventSourceController(IPollableEventSource source)
 {
     this.source = source;
 }