public void Add(IQueueWriterFactory factory) { if (!_dictionary.TryAdd(factory.Endpoint, factory)) { var message = string.Format("Failed to add {0}.{1}", factory.GetType().Name, factory.Endpoint); throw new InvalidOperationException(message); } }
public PubSubRouter(NuclearStorage storage, IQueueWriterFactory queueFactory, IEnvelopeStreamer streamer) { _storage = storage; _queueFactory = queueFactory; _streamer = streamer; }
public bool TryGet(string endpoint, out IQueueWriterFactory factory) { return(_dictionary.TryGetValue(endpoint, out factory)); }
public bool TryGet(string endpoint, out IQueueWriterFactory factory) { return _dictionary.TryGetValue(endpoint, out factory); }