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); } }
public void Register(IPollableEventSource publisher) { sourcesByStreamType.TryAdd(publisher.SourceName, (version, name) => publisher.PollEvents(version, name)); }
public EventSourceController(IPollableEventSource source) { this.source = source; }