/// <summary> /// Removes the topic from current PublisherClient publish list. /// </summary> /// <param name="topicName">Name of the topic.</param> /// <returns>Current PublisherClient.</returns> public PublisherClient RemoveTopic(string topicName = null) { this.CheckDisposed(); ServiceBusManager.RemoveLinkPublisherTopic(this.Name, topicName); return(this); }
/// <summary> /// Removes the publisher. /// </summary> /// <param name="publisherName">Name of the publisher.</param> /// <returns>Current Topic.</returns> public Topic RemovePublisher(string publisherName) { this.CheckDisposed(); ServiceBusManager.RemoveLinkPublisherTopic(publisherName, this.Name); return(this); }
/// <summary> /// Removes all topics from current PublisherClient publish list. /// </summary> /// <returns>Current PublisherClient.</returns> public PublisherClient RemoveAllTopics() { this.CheckDisposed(); Dictionary <string, Topic> .KeyCollection topics = null; lock (Utilities.GetSyncRoot(this._topics)) { topics = this._topics.Keys; } if (topics != null) { foreach (var topic in topics) { ServiceBusManager.RemoveLinkPublisherTopic(this.Name, topic); } } return(this); }
/// <summary> /// Removes all publishers. /// </summary> /// <returns>Current Topic.</returns> public Topic RemoveAllPublishers() { this.CheckDisposed(); Dictionary <string, PublisherClient> .KeyCollection publishers = null; lock (Utilities.GetSyncRoot(this._publishers)) { publishers = this._publishers.Keys; } if (publishers != null) { foreach (var publisher in publishers) { ServiceBusManager.RemoveLinkPublisherTopic(publisher, this.Name); } } return(this); }