public static SubscriptionClient Create(ServiceBusEntityConnection topicConnection, string subscriptionName, ReceiveMode mode) { if (topicConnection == null) { throw Fx.Exception.Argument(nameof(topicConnection), "Namespace Connection is null. Create a connection using the NamespaceConnection class"); } return(topicConnection.CreateSubscriptionClient(topicConnection.EntityPath, subscriptionName, mode)); }
public static SubscriptionClient CreateFromConnectionString(string topicEntityConnectionString, string subscriptionName, ReceiveMode mode) { if (string.IsNullOrWhiteSpace(topicEntityConnectionString)) { throw Fx.Exception.ArgumentNullOrWhiteSpace(nameof(topicEntityConnectionString)); } ServiceBusEntityConnection topicConnection = new ServiceBusEntityConnection(topicEntityConnectionString); return(topicConnection.CreateSubscriptionClient(topicConnection.EntityPath, subscriptionName, mode)); }