示例#1
0
 private async Task CreateTopic()
 {
     var management = new ManagementClient(Consts.CstrManagement);
     await management.CreateTopicIfNotExistsAsync(
         _options.TopicName,
         s =>
     {
         s.DefaultMessageTimeToLive = Consts.DefaultMessageTimeToLive;
     });
 }
示例#2
0
 public async static Task CreateTopicIfNotExistsAsync(this ManagementClient client, string topicName)
 => await client.CreateTopicIfNotExistsAsync(topicName, null);