ServiceBusConnectionStringBuilder ServiceBusConnectionStringBuilder Class

Creates and manages the contents of connection strings. You can use this class to construct a connection string for creating client messaging entities. It can also be used to perform basic validation on an existing connection string.

Syntax

Declaration

public class ServiceBusConnectionStringBuilderPublic Class ServiceBusConnectionStringBuilder

Inheritance Hierarchy

  • ServiceBusConnectionStringBuilder
    ServiceBusConnectionStringBuilder

Constructors summary

Initializes a new instance of the ServiceBusConnectionStringBuilder class.

Initializes a new instance of the ServiceBusConnectionStringBuilder class with a specified existing connection string.

Properties summary

Gets a collection of service endpoints. Each endpoint must reference the same Service Bus namespace.

Gets or sets the entity path for the Path, Path, and Path properties.

Gets or sets the TCP port number for management operations.

Gets or sets the authentication domain for the connection.

Gets or sets the authentication password for the connection.

Gets or sets the authentication user name for the connection.

Gets or sets the TimeSpan that specifies how long the messaging operation has to complete before timing out.

Get or sets the publisher identifier.

Gets or sets the TCP port number for runtime operation.

Gets or sets the shared access key for the connection authentication.

Gets or sets the name of the shared access key.

Gets or sets the SAS access token.

Gets or sets the shared secret issuer name.

Gets or sets the shared secret issuer secret.

Gets a set of STS endpoints.

Gets or sets the transport type to be used for client messaging entities.

Gets or sets the Windows credential domain.

Gets or sets the Windows credential password.

Gets or sets the Windows credential user name.

Methods summary

Creates a connection string using authentication credentials.

Create a connection string using the shared access key.

Create a connection string using the shared access key.

Creates a connection string using SAS credentials.

Creates a connection string using the shared secret credentials.

Creates a connection string using the shared secret credentials.

Creates a connection string using Windows credentials.

Retrieves the absolute management endpoints.

Retrieves the absolute runtime endpoints.

Returns a string that represents the current object.

Constructors

  • ServiceBusConnectionStringBuilder()
    ServiceBusConnectionStringBuilder()

    Initializes a new instance of the ServiceBusConnectionStringBuilder class.

    public ServiceBusConnectionStringBuilder()Public Sub New
  • ServiceBusConnectionStringBuilder(String)
    ServiceBusConnectionStringBuilder(String)

    Initializes a new instance of the ServiceBusConnectionStringBuilder class with a specified existing connection string.

    public ServiceBusConnectionStringBuilder(string connectionString)Public Sub New(connectionString As String)

    Parameters

    • connectionString

      The connection string, which you can obtain from the Azure Management Portal.

    Exceptions

Properties

  • EnableAmqpLinkRedirect
    EnableAmqpLinkRedirect
    public bool EnableAmqpLinkRedirect { get; set; }Public Property EnableAmqpLinkRedirect As Boolean

    Property Value

  • Endpoints
    Endpoints

    Gets a collection of service endpoints. Each endpoint must reference the same Service Bus namespace.

    public HashSet<Uri> Endpoints { get; }Public ReadOnly Property Endpoints As HashSet(Of Uri)

    Property Value

  • EntityPath
    EntityPath

    Gets or sets the entity path for the Path, Path, and Path properties.

    public string EntityPath { get; set; }Public Property EntityPath As String

    Property Value

  • ManagementPort
    ManagementPort

    Gets or sets the TCP port number for management operations.

    public int ManagementPort { get; set; }Public Property ManagementPort As Integer

    Property Value

  • OAuthDomain
    OAuthDomain

    Gets or sets the authentication domain for the connection.

    public string OAuthDomain { get; set; }Public Property OAuthDomain As String

    Property Value

    • The authentication domain for the connection.

  • OAuthPassword
    OAuthPassword

    Gets or sets the authentication password for the connection.

    public SecureString OAuthPassword { get; set; }Public Property OAuthPassword As SecureString

    Property Value

  • OAuthUsername
    OAuthUsername

    Gets or sets the authentication user name for the connection.

    public string OAuthUsername { get; set; }Public Property OAuthUsername As String

    Property Value

    • The authentication user name for the connection.

  • OperationTimeout
    OperationTimeout

    Gets or sets the TimeSpan that specifies how long the messaging operation has to complete before timing out.

    public TimeSpan OperationTimeout { get; set; }Public Property OperationTimeout As TimeSpan

    Property Value

    • The TimeSpan that specifies how long the messaging operation has to complete before timing out. The default value is one minute.

  • Publisher
    Publisher

    Get or sets the publisher identifier.

    public string Publisher { get; set; }Public Property Publisher As String

    Property Value

  • RuntimePort
    RuntimePort

    Gets or sets the TCP port number for runtime operation.

    public int RuntimePort { get; set; }Public Property RuntimePort As Integer

    Property Value

  • SharedAccessKey
    SharedAccessKey

    Gets or sets the shared access key for the connection authentication.

    public string SharedAccessKey { get; set; }Public Property SharedAccessKey As String

    Property Value

    • The shared access key for the connection authentication.

  • SharedAccessKeyName
    SharedAccessKeyName

    Gets or sets the name of the shared access key.

    public string SharedAccessKeyName { get; set; }Public Property SharedAccessKeyName As String

    Property Value

  • SharedAccessSignature
    SharedAccessSignature

    Gets or sets the SAS access token.

    public string SharedAccessSignature { get; set; }Public Property SharedAccessSignature As String

    Property Value

  • SharedSecretIssuerName
    SharedSecretIssuerName

    Gets or sets the shared secret issuer name.

    public string SharedSecretIssuerName { get; set; }Public Property SharedSecretIssuerName As String

    Property Value

  • SharedSecretIssuerSecret
    SharedSecretIssuerSecret

    Gets or sets the shared secret issuer secret.

    public string SharedSecretIssuerSecret { get; set; }Public Property SharedSecretIssuerSecret As String

    Property Value

  • StsEndpoints
    StsEndpoints

    Gets a set of STS endpoints.

    public HashSet<Uri> StsEndpoints { get; }Public ReadOnly Property StsEndpoints As HashSet(Of Uri)

    Property Value

  • TransportType
    TransportType

    Gets or sets the transport type to be used for client messaging entities.

    public TransportType TransportType { get; set; }Public Property TransportType As TransportType

    Property Value

  • WindowsCredentialDomain
    WindowsCredentialDomain

    Gets or sets the Windows credential domain.

    public string WindowsCredentialDomain { get; set; }Public Property WindowsCredentialDomain As String

    Property Value

  • WindowsCredentialPassword
    WindowsCredentialPassword

    Gets or sets the Windows credential password.

    public SecureString WindowsCredentialPassword { get; set; }Public Property WindowsCredentialPassword As SecureString

    Property Value

  • WindowsCredentialUsername
    WindowsCredentialUsername

    Gets or sets the Windows credential user name.

    public string WindowsCredentialUsername { get; set; }Public Property WindowsCredentialUsername As String

    Property Value

Methods

  • CreateUsingOAuthCredential(IEnumerable<Uri>, IEnumerable<Uri>, Int32, Int32, String, String, SecureString)
    CreateUsingOAuthCredential(IEnumerable(Of Uri), IEnumerable(Of Uri), Int32, Int32, String, String, SecureString)

    Creates a connection string using authentication credentials.

    public static string CreateUsingOAuthCredential(IEnumerable<Uri> endpoints, IEnumerable<Uri> stsEndpoints, int runtimePort, int managementPort, string domain, string user, SecureString password)Public Shared Function CreateUsingOAuthCredential(endpoints As IEnumerable(Of Uri), stsEndpoints As IEnumerable(Of Uri), runtimePort As Integer, managementPort As Integer, domain As String, user As String, password As SecureString) As String

    Parameters

    Returns

  • CreateUsingSharedAccessKey(IEnumerable<Uri>, Int32, Int32, String, String)
    CreateUsingSharedAccessKey(IEnumerable(Of Uri), Int32, Int32, String, String)

    Create a connection string using the shared access key.

    public static string CreateUsingSharedAccessKey(IEnumerable<Uri> endpoints, int runtimePort, int managementPort, string keyName, string key)Public Shared Function CreateUsingSharedAccessKey(endpoints As IEnumerable(Of Uri), runtimePort As Integer, managementPort As Integer, keyName As String, key As String) As String

    Parameters

    Returns

    • The created connection using the shared access key.

  • CreateUsingSharedAccessKey(Uri, String, String)
    CreateUsingSharedAccessKey(Uri, String, String)

    Create a connection string using the shared access key.

    public static string CreateUsingSharedAccessKey(Uri endpoint, string keyName, string key)Public Shared Function CreateUsingSharedAccessKey(endpoint As Uri, keyName As String, key As String) As String

    Parameters

    Returns

    • The created connection using the shared access key.

  • CreateUsingSharedAccessSignature(Uri, String, String, String)
    CreateUsingSharedAccessSignature(Uri, String, String, String)

    Creates a connection string using SAS credentials.

    public static string CreateUsingSharedAccessSignature(Uri endpoint, string entityPath, string publisher, string sharedAccessSignature)Public Shared Function CreateUsingSharedAccessSignature(endpoint As Uri, entityPath As String, publisher As String, sharedAccessSignature As String) As String

    Parameters

    Returns

  • CreateUsingSharedSecret(IEnumerable<Uri>, IEnumerable<Uri>, Int32, Int32, String, String)
    CreateUsingSharedSecret(IEnumerable(Of Uri), IEnumerable(Of Uri), Int32, Int32, String, String)

    Creates a connection string using the shared secret credentials.

    public static string CreateUsingSharedSecret(IEnumerable<Uri> endpoints, IEnumerable<Uri> stsEndpoints, int runtimePort, int managementPort, string issuer, string issuerSecret)Public Shared Function CreateUsingSharedSecret(endpoints As IEnumerable(Of Uri), stsEndpoints As IEnumerable(Of Uri), runtimePort As Integer, managementPort As Integer, issuer As String, issuerSecret As String) As String

    Parameters

    Returns

    • The created connection using the shared secret credentials.

  • CreateUsingSharedSecret(Uri, String, String)
    CreateUsingSharedSecret(Uri, String, String)

    Creates a connection string using the shared secret credentials.

    public static string CreateUsingSharedSecret(Uri endpoint, string issuer, string issuerSecret)Public Shared Function CreateUsingSharedSecret(endpoint As Uri, issuer As String, issuerSecret As String) As String

    Parameters

    Returns

    • The created connection using the shared secret credentials.

  • CreateUsingWindowsCredential(IEnumerable<Uri>, IEnumerable<Uri>, Int32, Int32, String, String, SecureString)
    CreateUsingWindowsCredential(IEnumerable(Of Uri), IEnumerable(Of Uri), Int32, Int32, String, String, SecureString)

    Creates a connection string using Windows credentials.

    public static string CreateUsingWindowsCredential(IEnumerable<Uri> endpoints, IEnumerable<Uri> stsEndpoints, int runtimePort, int managementPort, string domain, string user, SecureString password)Public Shared Function CreateUsingWindowsCredential(endpoints As IEnumerable(Of Uri), stsEndpoints As IEnumerable(Of Uri), runtimePort As Integer, managementPort As Integer, domain As String, user As String, password As SecureString) As String

    Parameters

    Returns

  • GetAbsoluteManagementEndpoints()
    GetAbsoluteManagementEndpoints()

    Retrieves the absolute management endpoints.

    public IList<Uri> GetAbsoluteManagementEndpoints()Public Function GetAbsoluteManagementEndpoints As IList(Of Uri)

    Returns

  • GetAbsoluteRuntimeEndpoints()
    GetAbsoluteRuntimeEndpoints()

    Retrieves the absolute runtime endpoints.

    public IList<Uri> GetAbsoluteRuntimeEndpoints()Public Function GetAbsoluteRuntimeEndpoints As IList(Of Uri)

    Returns

  • ToString()
    ToString()

    Returns a string that represents the current object.

    public override string ToString()Public Overrides Function ToString As String

    Returns

    • A string that represents the current object.

Details

Assembly

Microsoft.ServiceBus.dll