/// <summary> /// Adds a topic. /// </summary> /// <param name="name">The topic name.</param> /// <returns></returns> public ServiceBusTopicBuilder AddTopic(string name) { var topicBuilder = ServiceBusTopicBuilder.New(name); _topics.Add(topicBuilder); return(topicBuilder); }
/// <summary> /// Creates a new topic /// </summary> /// <param name="configure">The builder.</param> /// <returns>Client to access the created topic</returns> public async Task <ITopicClient> CreateTopicAsync(Action <ServiceBusTopicBuilder> configure) { var builder = ServiceBusTopicBuilder.New(); configure(builder); ServiceBusTopicModel topic = builder.Build(); await CreateTopicAsync(topic); _serviceBusModel.Topics.Add(topic); return(GetTopicClient(topic.Name)); }