ServiceClient.CreateFromConnectionString Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateFromConnectionString(String, ServiceClientOptions) |
Creates ServiceClient from an IoT hub connection string. |
CreateFromConnectionString(String, TransportType, ServiceClientOptions) |
Create an instance of ServiceClient from the specified IoT hub connection string using specified Transport Type. |
CreateFromConnectionString(String, TransportType, ServiceClientTransportSettings, ServiceClientOptions) |
Create an instance of ServiceClient from the specified IoT hub connection string using specified Transport Type and transport settings. |
CreateFromConnectionString(String, ServiceClientOptions)
Creates ServiceClient from an IoT hub connection string.
public static Microsoft.Azure.Devices.ServiceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.ServiceClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.ServiceClientOptions -> Microsoft.Azure.Devices.ServiceClient
Public Shared Function CreateFromConnectionString (connectionString As String, Optional options As ServiceClientOptions = Nothing) As ServiceClient
Parameters
- connectionString
- String
Connection string for the IoT hub.
- options
- ServiceClientOptions
The ServiceClientOptions that allow configuration of the service client instance during initialization.
Returns
A ServiceClient instance.
Applies to
CreateFromConnectionString(String, TransportType, ServiceClientOptions)
Create an instance of ServiceClient from the specified IoT hub connection string using specified Transport Type.
public static Microsoft.Azure.Devices.ServiceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.TransportType transportType, Microsoft.Azure.Devices.ServiceClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.TransportType * Microsoft.Azure.Devices.ServiceClientOptions -> Microsoft.Azure.Devices.ServiceClient
Public Shared Function CreateFromConnectionString (connectionString As String, transportType As TransportType, Optional options As ServiceClientOptions = Nothing) As ServiceClient
Parameters
- connectionString
- String
Connection string for the IoT hub.
- transportType
- TransportType
The TransportType used (Amqp or Amqp_WebSocket_Only).
- options
- ServiceClientOptions
The ServiceClientOptions that allow configuration of the service client instance during initialization.
Returns
An instance of ServiceClient.
Applies to
CreateFromConnectionString(String, TransportType, ServiceClientTransportSettings, ServiceClientOptions)
Create an instance of ServiceClient from the specified IoT hub connection string using specified Transport Type and transport settings.
public static Microsoft.Azure.Devices.ServiceClient CreateFromConnectionString (string connectionString, Microsoft.Azure.Devices.TransportType transportType, Microsoft.Azure.Devices.ServiceClientTransportSettings transportSettings, Microsoft.Azure.Devices.ServiceClientOptions options = default);
static member CreateFromConnectionString : string * Microsoft.Azure.Devices.TransportType * Microsoft.Azure.Devices.ServiceClientTransportSettings * Microsoft.Azure.Devices.ServiceClientOptions -> Microsoft.Azure.Devices.ServiceClient
Public Shared Function CreateFromConnectionString (connectionString As String, transportType As TransportType, transportSettings As ServiceClientTransportSettings, Optional options As ServiceClientOptions = Nothing) As ServiceClient
Parameters
- connectionString
- String
Connection string for the IoT hub.
- transportType
- TransportType
The TransportType used (Amqp or Amqp_WebSocket_Only).
- transportSettings
- ServiceClientTransportSettings
Specifies the AMQP and HTTP proxy settings for Service Client.
- options
- ServiceClientOptions
The ServiceClientOptions that allow configuration of the service client instance during initialization.
Returns
An instance of ServiceClient.
Applies to
Azure SDK for .NET