private static async Task CreateSubscription(string topicName, string subscriptionName) { var management = new ManagementClient(Consts.CstrManagement); await management.CreateSubscriptionIfNotExistsAsync( topicName, subscriptionName, s => { s.DefaultMessageTimeToLive = Consts.DefaultMessageTimeToLive; }); }
public async static Task CreateSubscriptionIfNotExistsAsync( this ManagementClient client, string topicName, string subscriptionName) => await client.CreateSubscriptionIfNotExistsAsync(topicName, subscriptionName, null);