共用方式為


DeviceClient.Create Method

Definition

Overloads

Create(String, String, IAuthenticationMethod, TransportType, ClientOptions)

Create a disposable DeviceClient from the specified parameters

Create(String, String, IAuthenticationMethod, ITransportSettings[], ClientOptions)

Creates a disposable DeviceClient from the specified parameters

Create(String, IAuthenticationMethod, TransportType, ClientOptions)

Creates a disposable DeviceClient from the specified parameters

Create(String, String, IAuthenticationMethod, ClientOptions)

Create a disposable, AMQP DeviceClient from the specified parameters

Create(String, IAuthenticationMethod, TransportType)

Creates a disposable DeviceClient from the specified parameters

Create(String, IAuthenticationMethod, ClientOptions)

Creates a disposable DeviceClient from the specified parameters, that uses AMQP transport protocol.

Create(String, IAuthenticationMethod)

Creates a disposable, Amqp DeviceClient from the specified parameters

Create(String, IAuthenticationMethod, ITransportSettings[], ClientOptions)

Creates a disposable DeviceClient from the specified parameters

Create(String, String, IAuthenticationMethod, TransportType, ClientOptions)

Create a disposable DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, string gatewayHostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.TransportType * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, gatewayHostname As String, authenticationMethod As IAuthenticationMethod, transportType As TransportType, Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

gatewayHostname
String

The fully-qualified DNS host name of Gateway

authenticationMethod
IAuthenticationMethod

The authentication method that is used

transportType
TransportType

The transportType used (Http1, AMQP or MQTT), TransportType

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to

Create(String, String, IAuthenticationMethod, ITransportSettings[], ClientOptions)

Creates a disposable DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, string gatewayHostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.ITransportSettings[] transportSettings, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.ITransportSettings[] * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, gatewayHostname As String, authenticationMethod As IAuthenticationMethod, transportSettings As ITransportSettings(), Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

gatewayHostname
String

The fully-qualified DNS host name of Gateway

authenticationMethod
IAuthenticationMethod

The authentication method that is used

transportSettings
ITransportSettings[]

Prioritized list of transportTypes and their settings

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to

Create(String, IAuthenticationMethod, TransportType, ClientOptions)

Creates a disposable DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.TransportType transportType, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.TransportType * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, authenticationMethod As IAuthenticationMethod, transportType As TransportType, Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

authenticationMethod
IAuthenticationMethod

The authentication method that is used

transportType
TransportType

The transportType used (HTTP1, AMQP or MQTT), TransportType

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to

Create(String, String, IAuthenticationMethod, ClientOptions)

Create a disposable, AMQP DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, string gatewayHostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, gatewayHostname As String, authenticationMethod As IAuthenticationMethod, Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

gatewayHostname
String

The fully-qualified DNS host name of Gateway

authenticationMethod
IAuthenticationMethod

The authentication method that is used

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to

Create(String, IAuthenticationMethod, TransportType)

Creates a disposable DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.TransportType transportType);
static member Create : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.TransportType -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, authenticationMethod As IAuthenticationMethod, transportType As TransportType) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS hostname of IoT Hub

authenticationMethod
IAuthenticationMethod

The authentication method that is used

transportType
TransportType

The transportType used (Http1 or Amqp)

Returns

A disposable DeviceClient instance

Applies to

Create(String, IAuthenticationMethod, ClientOptions)

Creates a disposable DeviceClient from the specified parameters, that uses AMQP transport protocol.

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, authenticationMethod As IAuthenticationMethod, Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

authenticationMethod
IAuthenticationMethod

The authentication method that is used

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to

Create(String, IAuthenticationMethod)

Creates a disposable, Amqp DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod);
static member Create : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, authenticationMethod As IAuthenticationMethod) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS hostname of IoT Hub

authenticationMethod
IAuthenticationMethod

The authentication method that is used

Returns

A disposable DeviceClient instance

Applies to

Create(String, IAuthenticationMethod, ITransportSettings[], ClientOptions)

Creates a disposable DeviceClient from the specified parameters

public static Microsoft.Azure.Devices.Client.DeviceClient Create (string hostname, Microsoft.Azure.Devices.Client.IAuthenticationMethod authenticationMethod, Microsoft.Azure.Devices.Client.ITransportSettings[] transportSettings, Microsoft.Azure.Devices.Client.ClientOptions options = default);
static member Create : string * Microsoft.Azure.Devices.Client.IAuthenticationMethod * Microsoft.Azure.Devices.Client.ITransportSettings[] * Microsoft.Azure.Devices.Client.ClientOptions -> Microsoft.Azure.Devices.Client.DeviceClient
Public Shared Function Create (hostname As String, authenticationMethod As IAuthenticationMethod, transportSettings As ITransportSettings(), Optional options As ClientOptions = Nothing) As DeviceClient

Parameters

hostname
String

The fully-qualified DNS host name of IoT hub

authenticationMethod
IAuthenticationMethod

The authentication method that is used

transportSettings
ITransportSettings[]

Prioritized list of transportTypes and their settings

options
ClientOptions

The options that allow configuration of the device client instance during initialization.

Returns

A disposable DeviceClient instance

Applies to