共用方式為


IotHubClient Constructors

Definition

Overloads

IotHubClient(DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(HttpClient, Boolean)

Initializes a new instance of the IotHubClient class.

IotHubClient(HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(Uri, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the IotHubClient class.

IotHubClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(Uri, ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(Uri, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(Uri, ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

IotHubClient(DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

protected IotHubClient (params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Protected Sub New (ParamArray handlers As DelegatingHandler())

Parameters

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Applies to

IotHubClient(ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

public IotHubClient (Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Public Sub New (credentials As ServiceClientCredentials, ParamArray handlers As DelegatingHandler())

Parameters

credentials
ServiceClientCredentials

Required. Credentials needed for the client to connect to Azure.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(HttpClient, Boolean)

Initializes a new instance of the IotHubClient class.

protected IotHubClient (System.Net.Http.HttpClient httpClient, bool disposeHttpClient);
new Microsoft.Azure.Management.IotHub.IotHubClient : System.Net.Http.HttpClient * bool -> Microsoft.Azure.Management.IotHub.IotHubClient
Protected Sub New (httpClient As HttpClient, disposeHttpClient As Boolean)

Parameters

httpClient
HttpClient

HttpClient to be used

disposeHttpClient
Boolean

True: will dispose the provided httpClient on calling IotHubClient.Dispose(). False: will not dispose provided httpClient

Applies to

IotHubClient(HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

protected IotHubClient (System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Protected Sub New (rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Applies to

IotHubClient(Uri, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

protected IotHubClient (Uri baseUri, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Uri * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Protected Sub New (baseUri As Uri, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(ServiceClientCredentials, HttpClient, Boolean)

Initializes a new instance of the IotHubClient class.

public IotHubClient (Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClient httpClient, bool disposeHttpClient);
new Microsoft.Azure.Management.IotHub.IotHubClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClient * bool -> Microsoft.Azure.Management.IotHub.IotHubClient
Public Sub New (credentials As ServiceClientCredentials, httpClient As HttpClient, disposeHttpClient As Boolean)

Parameters

credentials
ServiceClientCredentials

Required. Credentials needed for the client to connect to Azure.

httpClient
HttpClient

HttpClient to be used

disposeHttpClient
Boolean

True: will dispose the provided httpClient on calling IotHubClient.Dispose(). False: will not dispose provided httpClient

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

public IotHubClient (Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Public Sub New (credentials As ServiceClientCredentials, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

credentials
ServiceClientCredentials

Required. Credentials needed for the client to connect to Azure.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(Uri, ServiceClientCredentials, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

public IotHubClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

credentials
ServiceClientCredentials

Required. Credentials needed for the client to connect to Azure.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(Uri, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

protected IotHubClient (Uri baseUri, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Uri * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Protected Sub New (baseUri As Uri, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to

IotHubClient(Uri, ServiceClientCredentials, HttpClientHandler, DelegatingHandler[])

Initializes a new instance of the IotHubClient class.

public IotHubClient (Uri baseUri, Microsoft.Rest.ServiceClientCredentials credentials, System.Net.Http.HttpClientHandler rootHandler, params System.Net.Http.DelegatingHandler[] handlers);
new Microsoft.Azure.Management.IotHub.IotHubClient : Uri * Microsoft.Rest.ServiceClientCredentials * System.Net.Http.HttpClientHandler * System.Net.Http.DelegatingHandler[] -> Microsoft.Azure.Management.IotHub.IotHubClient
Public Sub New (baseUri As Uri, credentials As ServiceClientCredentials, rootHandler As HttpClientHandler, ParamArray handlers As DelegatingHandler())

Parameters

baseUri
Uri

Optional. The base URI of the service.

credentials
ServiceClientCredentials

Required. Credentials needed for the client to connect to Azure.

rootHandler
HttpClientHandler

Optional. The http client handler used to handle http transport.

handlers
DelegatingHandler[]

Optional. The delegating handlers to add to the http client pipeline.

Exceptions

Thrown when a required parameter is null

Applies to