共用方式為


ServiceBusConnection Constructors

Definition

Overloads

ServiceBusConnection(ServiceBusConnectionStringBuilder)

Creates a new connection to service bus.

ServiceBusConnection(String)

Creates a new connection to service bus.

ServiceBusConnection(String, RetryPolicy)

Creates a new connection to service bus.

ServiceBusConnection(String, TransportType, RetryPolicy)

Creates a new connection to service bus.

ServiceBusConnection(String, TimeSpan, RetryPolicy)
Obsolete.

Creates a new connection to service bus.

ServiceBusConnection(ServiceBusConnectionStringBuilder)

Source:
ServiceBusConnection.cs

Creates a new connection to service bus.

public ServiceBusConnection (Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder connectionStringBuilder);
new Microsoft.Azure.ServiceBus.ServiceBusConnection : Microsoft.Azure.ServiceBus.ServiceBusConnectionStringBuilder -> Microsoft.Azure.ServiceBus.ServiceBusConnection
Public Sub New (connectionStringBuilder As ServiceBusConnectionStringBuilder)

Parameters

connectionStringBuilder
ServiceBusConnectionStringBuilder

ServiceBusConnectionStringBuilder having namespace information.

Remarks

It is the responsibility of the user to close the connection after use through CloseAsync()

Applies to

ServiceBusConnection(String)

Source:
ServiceBusConnection.cs

Creates a new connection to service bus.

public ServiceBusConnection (string namespaceConnectionString);
new Microsoft.Azure.ServiceBus.ServiceBusConnection : string -> Microsoft.Azure.ServiceBus.ServiceBusConnection
Public Sub New (namespaceConnectionString As String)

Parameters

namespaceConnectionString
String

Namespace connection string

Remarks

It is the responsibility of the user to close the connection after use through CloseAsync()

Applies to

ServiceBusConnection(String, RetryPolicy)

Source:
ServiceBusConnection.cs

Creates a new connection to service bus.

public ServiceBusConnection (string namespaceConnectionString, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
new Microsoft.Azure.ServiceBus.ServiceBusConnection : string * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.ServiceBusConnection
Public Sub New (namespaceConnectionString As String, Optional retryPolicy As RetryPolicy = Nothing)

Parameters

namespaceConnectionString
String

Namespace connection string.

retryPolicy
RetryPolicy

Retry policy for operations. Defaults to Default

Remarks

It is the responsibility of the user to close the connection after use through CloseAsync()

Applies to

ServiceBusConnection(String, TransportType, RetryPolicy)

Source:
ServiceBusConnection.cs

Creates a new connection to service bus.

public ServiceBusConnection (string endpoint, Microsoft.Azure.ServiceBus.TransportType transportType, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
new Microsoft.Azure.ServiceBus.ServiceBusConnection : string * Microsoft.Azure.ServiceBus.TransportType * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.ServiceBusConnection
Public Sub New (endpoint As String, transportType As TransportType, Optional retryPolicy As RetryPolicy = Nothing)

Parameters

endpoint
String

Fully qualified domain name for Service Bus. Most likely, {yournamespace}.servicebus.windows.net

transportType
TransportType

Transport type.

retryPolicy
RetryPolicy

Retry policy for operations. Defaults to Default

Applies to

ServiceBusConnection(String, TimeSpan, RetryPolicy)

Source:
ServiceBusConnection.cs

Caution

This constructor is obsolete. Use ServiceBusConnection(string namespaceConnectionString, RetryPolicy retryPolicy) constructor instead, providing operationTimeout in the connection string.

Creates a new connection to service bus.

[System.Obsolete("This constructor is obsolete. Use ServiceBusConnection(string namespaceConnectionString, RetryPolicy retryPolicy) constructor instead, providing operationTimeout in the connection string.")]
public ServiceBusConnection (string namespaceConnectionString, TimeSpan operationTimeout, Microsoft.Azure.ServiceBus.RetryPolicy retryPolicy = default);
[<System.Obsolete("This constructor is obsolete. Use ServiceBusConnection(string namespaceConnectionString, RetryPolicy retryPolicy) constructor instead, providing operationTimeout in the connection string.")>]
new Microsoft.Azure.ServiceBus.ServiceBusConnection : string * TimeSpan * Microsoft.Azure.ServiceBus.RetryPolicy -> Microsoft.Azure.ServiceBus.ServiceBusConnection
Public Sub New (namespaceConnectionString As String, operationTimeout As TimeSpan, Optional retryPolicy As RetryPolicy = Nothing)

Parameters

namespaceConnectionString
String

Namespace connection string.

operationTimeout
TimeSpan

Duration after which individual operations will timeout.

retryPolicy
RetryPolicy

Retry policy for operations. Defaults to Default

Attributes

Remarks

It is the responsibility of the user to close the connection after use through CloseAsync()

Applies to