public void AddSender(string name, Sender sender) { _senderCacheLock.EnterWriteLock(); if (_senders.ContainsKey(name)) { _senders[name] = sender; } else { _senders.Add(name, sender); } _senderCacheLock.ExitWriteLock(); }
private Sender CreateTopicSender(string topicName) { _validator.EnsureTopic(topicName); ISendClient client = _clientFactory.CreateTopicClient(topicName); Sender sender = new Sender(client); return sender; }
private Sender CreateQueueSender(string queueName) { _validator.EnsureQueue(queueName); ISendClient client = _clientFactory.CreateQueueClient(queueName); Sender sender = new Sender(client); return sender; }