ServiceBusConnectionStringBuilder Class
Provides a simple way to create and manage the contents of connection strings used by the MessagingFactory class.
Namespace: Microsoft.ServiceBus
Assembly: Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
The ServiceBusConnectionStringBuilder type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | ServiceBusConnectionStringBuilder() | Initializes a new instance of the ServiceBusConnectionStringBuilder class. |
![]() | ServiceBusConnectionStringBuilder(String) | Initializes a new instance of the ServiceBusConnectionStringBuilder class with the specified connection string. |
| Name | Description | |
|---|---|---|
![]() | Endpoints | Gets a set of endpoints. |
![]() | ManagementPort | Gets or sets the management port. |
![]() | OAuthDomain | Gets or sets the authentication domain for the connection. |
![]() | OAuthPassword | Gets or sets the authentication password for the connection. |
![]() | OAuthUsername | Gets or sets the authentication user name for the connection. |
![]() | OperationTimeout | Gets or sets the TimeSpan that specifies how long the messaging operation has to complete before timing out. |
![]() | RuntimePort | Gets or sets the runtime port. |
![]() | SharedAccessKey | Gets or sets the shared access key for the connection authentication. |
![]() | SharedAccessKeyName | Gets or sets the name of the shared access key. |
![]() | SharedSecretIssuerName | Gets or sets the shared secret issuer name. |
![]() | SharedSecretIssuerSecret | Gets or sets the shared secret issuer secret. |
![]() | StsEndpoints | Gets a set of STS endpoints. |
![]() | TransportType | Gets or sets the transport type associated with the connection. |
![]() | WindowsCredentialDomain | Gets or sets the Windows credential domain. |
![]() | WindowsCredentialPassword | Gets or sets the Windows credential password. |
![]() | WindowsCredentialUsername | Gets or sets the Windows credential user name. |
| Name | Description | |
|---|---|---|
![]() ![]() | CreateUsingOAuthCredential | Creates a service bus connection string using authentication credentials. |
![]() ![]() | CreateUsingSharedAccessKey(Uri, String, String) | Create a connection using the shared access key. |
![]() ![]() | CreateUsingSharedAccessKey(IEnumerable<Uri>, Int32, Int32, String, String) | Create a connection using the shared access key. |
![]() ![]() | CreateUsingSharedSecret(Uri, String, String) | Creates a connection using the shared secret credentials. |
![]() ![]() | CreateUsingSharedSecret(IEnumerable<Uri>, IEnumerable<Uri>, Int32, Int32, String, String) | Creates a connection using the shared secret credentials. |
![]() ![]() | CreateUsingWindowsCredential | Creates a connection using Windows credentials. |
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetAbsoluteManagementEndpoints | Retrieves the absolute management endpoints. |
![]() | GetAbsoluteRuntimeEndpoints | Retrieves the absolute runtime endpoints. |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Overrides Object.ToString().) |
The following example shows how to use the ServiceBusConnectionStringBuilder class.
ServiceBusConnectionStringBuilder builder = new ServiceBusConnectionStringBuilder();
builder.Endpoints.Add(new Uri("sb://yourNamespaceUri");
builder.StsEndpoints.Add(new Uri("https://stsEndpoint:port");
builder.RuntimePort = 1234;
builder.ManagementPort = 2345;
MessagingFactory factory = MessagingFactory.CreateFromConnectionString(builder.ToString());
