This topic has not yet been rated - Rate this topic

ServiceBusConnectionStringBuilder Class

Provides a simple way to create and manage the contents of connection strings used by the MessagingFactory class.

System.Object
  Microsoft.ServiceBus.ServiceBusConnectionStringBuilder

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)
public class ServiceBusConnectionStringBuilder

The ServiceBusConnectionStringBuilder type exposes the following members.

  NameDescription
Public methodServiceBusConnectionStringBuilder()Initializes a new instance of the ServiceBusConnectionStringBuilder class.
Public methodServiceBusConnectionStringBuilder(String)Initializes a new instance of the ServiceBusConnectionStringBuilder class with the specified connection string.
Top
  NameDescription
Public propertyEndpointsGets a set of endpoints.
Public propertyManagementPortGets or sets the management port.
Public propertyOAuthDomainGets or sets the authentication domain for the connection.
Public propertyOAuthPasswordGets or sets the authentication password for the connection.
Public propertyOAuthUsernameGets or sets the authentication user name for the connection.
Public propertyOperationTimeoutGets or sets the TimeSpan that specifies how long the messaging operation has to complete before timing out.
Public propertyRuntimePortGets or sets the runtime port.
Public propertySharedAccessKeyGets or sets the shared access key for the connection authentication.
Public propertySharedAccessKeyNameGets or sets the name of the shared access key.
Public propertySharedSecretIssuerNameGets or sets the shared secret issuer name.
Public propertySharedSecretIssuerSecretGets or sets the shared secret issuer secret.
Public propertyStsEndpointsGets a set of STS endpoints.
Public propertyTransportTypeGets or sets the transport type associated with the connection.
Public propertyWindowsCredentialDomainGets or sets the Windows credential domain.
Public propertyWindowsCredentialPasswordGets or sets the Windows credential password.
Public propertyWindowsCredentialUsernameGets or sets the Windows credential user name.
Top
  NameDescription
Public methodStatic memberCreateUsingOAuthCredentialCreates a service bus connection string using authentication credentials.
Public methodStatic memberCreateUsingSharedAccessKey(Uri, String, String)Create a connection using the shared access key.
Public methodStatic memberCreateUsingSharedAccessKey(IEnumerable<Uri>, Int32, Int32, String, String)Create a connection using the shared access key.
Public methodStatic memberCreateUsingSharedSecret(Uri, String, String)Creates a connection using the shared secret credentials.
Public methodStatic memberCreateUsingSharedSecret(IEnumerable<Uri>, IEnumerable<Uri>, Int32, Int32, String, String)Creates a connection using the shared secret credentials.
Public methodStatic memberCreateUsingWindowsCredentialCreates a connection using Windows credentials.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetAbsoluteManagementEndpointsRetrieves the absolute management endpoints.
Public methodGetAbsoluteRuntimeEndpointsRetrieves the absolute runtime endpoints.
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Overrides Object.ToString().)
Top

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());

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.