Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new SessionClient from a <see cref="ServiceBusConnectionStringBuilder"/>
 /// </summary>
 /// <param name="connectionStringBuilder">The <see cref="ServiceBusConnectionStringBuilder"/> having entity level connection details.</param>
 /// <param name="receiveMode">The <see cref="ReceiveMode"/> used to specify how messages are received. Defaults to PeekLock mode.</param>
 /// <param name="retryPolicy">The <see cref="RetryPolicy"/> that will be used when communicating with ServiceBus. Defaults to <see cref="RetryPolicy.Default"/></param>
 /// <param name="prefetchCount">The <see cref="PrefetchCount"/> that specifies the upper limit of messages the session object
 /// will actively receive regardless of whether a receive operation is pending. Defaults to 0.</param>
 /// <remarks>Creates a new connection to the entity, which is used for all the sessions objects accepted using this client.</remarks>
 public SessionClient(
     ServiceBusConnectionStringBuilder connectionStringBuilder,
     ReceiveMode receiveMode = ReceiveMode.PeekLock,
     RetryPolicy retryPolicy = null,
     int prefetchCount       = DefaultPrefetchCount)
     : this(connectionStringBuilder?.GetNamespaceConnectionString(), connectionStringBuilder?.EntityPath, receiveMode, retryPolicy, prefetchCount)
 {
 }
Ejemplo n.º 2
0
 /// <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>
 /// <remarks>Creates a new connection to the subscription, which is opened during the first receive operation.</remarks>
 public SubscriptionClient(ServiceBusConnectionStringBuilder connectionStringBuilder, string subscriptionName, ReceiveMode receiveMode = ReceiveMode.PeekLock, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder?.GetNamespaceConnectionString(), connectionStringBuilder?.EntityPath, subscriptionName, 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>
 /// <remarks>Creates a new connection to the topic, which is opened during the first send operation.</remarks>
 public TopicClient(ServiceBusConnectionStringBuilder connectionStringBuilder, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder?.GetNamespaceConnectionString(), connectionStringBuilder?.EntityPath, retryPolicy)
 {
 }
Ejemplo n.º 4
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())
 {
 }
Ejemplo n.º 5
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>
 public QueueClient(ServiceBusConnectionStringBuilder connectionStringBuilder, ReceiveMode receiveMode = ReceiveMode.PeekLock, RetryPolicy retryPolicy = null)
     : this(connectionStringBuilder.GetNamespaceConnectionString(), connectionStringBuilder.EntityPath, receiveMode, retryPolicy)
 {
 }