/// <summary>
 /// Create a disposable DeviceClient from the specified connection string using a prioritized list of transports
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (with DeviceId)</param>
 /// <param name="transportSettings">Prioritized list of transports and their settings</param>
 /// <param name="options">The options that allow configuration of the device client instance during initialization.</param>
 /// <returns>A disposable DeviceClient instance</returns>
 public static DeviceClient CreateFromConnectionString(
     string connectionString,
     ITransportSettings[] transportSettings,
     ClientOptions options = default)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, transportSettings, options)));
 }
 /// <summary>
 /// Creates a disposable DeviceClient from the specified connection string using the specified transport type
 /// </summary>
 /// <param name="connectionString">IoT hub-Scope Connection string for the IoT hub (without DeviceId)</param>
 /// <param name="deviceId">Id of the device</param>
 /// <param name="transportType">The transportType used (Http1, AMQP or MQTT), <see cref="TransportType"/></param>
 /// <param name="options">The options that allow configuration of the device client instance during initialization.</param>
 /// <returns>A disposable DeviceClient instance</returns>
 public static DeviceClient CreateFromConnectionString(
     string connectionString,
     string deviceId,
     TransportType transportType,
     ClientOptions options = default)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, deviceId, transportType, options)));
 }
 /// <summary>
 /// Creates a ModuleClient using AMQP transport from the specified connection string
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (including DeviceId)</param>
 /// <param name="options">The options that allow configuration of the module client instance during initialization.</param>
 /// <returns>ModuleClient</returns>
 public static ModuleClient CreateFromConnectionString(string connectionString, ClientOptions options = default)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, options)));
 }
Beispiel #4
0
 /// <summary>
 /// Create ModuleClient from the specified connection string using a prioritized list of transports
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (with DeviceId)</param>
 /// <param name="transportSettings">Prioritized list of transports and their settings</param>
 /// <returns>ModuleClient</returns>
 public static ModuleClient CreateFromConnectionString(string connectionString,
                                                       ITransportSettings[] transportSettings)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, transportSettings)));
 }
Beispiel #5
0
 /// <summary>
 /// Create ModuleClient from the specified connection string using the specified transport type
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (including DeviceId)</param>
 /// <param name="transportType">Specifies whether Amqp or Http transport is used</param>
 /// <returns>ModuleClient</returns>
 public static ModuleClient CreateFromConnectionString(string connectionString, TransportType transportType)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, transportType)));
 }
Beispiel #6
0
 /// <summary>
 /// Create a ModuleClient using Amqp transport from the specified connection string
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (including DeviceId)</param>
 /// <returns>ModuleClient</returns>
 public static ModuleClient CreateFromConnectionString(string connectionString)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString)));
 }
 /// <summary>
 /// Creates a disposable DeviceClient from the specified connection string using the prioritized list of transports
 /// </summary>
 /// <param name="connectionString">Connection string for the IoT hub (without DeviceId)</param>
 /// <param name="deviceId">Id of the device</param>
 /// <param name="transportSettings">Prioritized list of transportTypes and their settings</param>
 /// <returns>A disposable DeviceClient instance</returns>
 public static DeviceClient CreateFromConnectionString(string connectionString, string deviceId,
                                                       ITransportSettings[] transportSettings)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, deviceId, transportSettings)));
 }
 /// <summary>
 /// Creates a disposable DeviceClient using Amqp transport from the specified connection string
 /// </summary>
 /// <param name="connectionString">IoT Hub-Scope Connection string for the IoT hub (without DeviceId)</param>
 /// <param name="deviceId">Id of the Device</param>
 /// <returns>A disposable DeviceClient instance</returns>
 public static DeviceClient CreateFromConnectionString(string connectionString, string deviceId)
 {
     return(Create(() => ClientFactory.CreateFromConnectionString(connectionString, deviceId)));
 }