Ejemplo n.º 1
0
 /// <summary>
 /// Instantiates a new <see cref="QueueClient"/> to perform operations on a queue.
 /// </summary>
 /// <param name="connectionStringBuilder"><see cref="ServiceBusConnectionStringBuilder"/> having namespace and queue information.</param>
 /// <param name="receiveMode">Mode of receive of messages. Defaults to <see cref="ReceiveMode"/>.PeekLock.</param>
 /// <param name="retryPolicy">Retry policy for queue operations. Defaults to <see cref="RetryPolicy.Default"/></param>
 /// <remarks>Creates a new connection to the queue, which is opened during the first send/receive operation.</remarks>
 public QueueClient(ServiceBusConnectionStringBuilder connectionStringBuilder, ReceiveMode receiveMode = ReceiveMode.PeekLock, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder?.GetNamespaceConnectionString(), connectionStringBuilder?.EntityPath, receiveMode, retryPolicy)
 {
 }
 /// <summary>
 /// Instantiates a new <see cref="TopicClient"/> to perform operations on a topic.
 /// </summary>
 /// <param name="connectionStringBuilder"><see cref="ServiceBusConnectionStringBuilder"/> having namespace and topic information.</param>
 /// <param name="retryPolicy">Retry policy for topic operations. Defaults to <see cref="RetryPolicy.Default"/></param>
 public TopicClient(ServiceBusConnectionStringBuilder connectionStringBuilder, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder.GetNamespaceConnectionString(), connectionStringBuilder.EntityPath, retryPolicy)
 {
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new connection to service bus.
 /// </summary>
 /// <param name="connectionStringBuilder"><see cref="ServiceBusConnectionStringBuilder"/> having namespace information.</param>
 /// <remarks>It is the responsibility of the user to close the connection after use through <see cref="CloseAsync"/></remarks>
 public ServiceBusConnection(ServiceBusConnectionStringBuilder connectionStringBuilder)
     : this(connectionStringBuilder?.GetNamespaceConnectionString())
 {
 }
 /// <summary>
 /// Instantiates a new <see cref="SubscriptionClient"/> to perform operations on a subscription.
 /// </summary>
 /// <param name="connectionStringBuilder"><see cref="ServiceBusConnectionStringBuilder"/> having namespace and topic information.</param>
 /// <param name="subscriptionName">Name of the subscription.</param>
 /// <param name="receiveMode">Mode of receive of messages. Defaults to <see cref="ReceiveMode"/>.PeekLock.</param>
 /// <param name="retryPolicy">Retry policy for subscription operations. Defaults to <see cref="RetryPolicy.Default"/></param>
 public SubscriptionClient(ServiceBusConnectionStringBuilder connectionStringBuilder, string subscriptionName, ReceiveMode receiveMode = ReceiveMode.PeekLock, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder.GetNamespaceConnectionString(), connectionStringBuilder.EntityPath, subscriptionName, receiveMode, retryPolicy)
 {
 }