diff --git a/nanoFramework.Azure.Devices.Client/DeviceClient.cs b/nanoFramework.Azure.Devices.Client/DeviceClient.cs index ad478c0..61d8553 100644 --- a/nanoFramework.Azure.Devices.Client/DeviceClient.cs +++ b/nanoFramework.Azure.Devices.Client/DeviceClient.cs @@ -183,6 +183,25 @@ public DeviceClient(string iotHubName, string deviceId, string sasKey, MqttQoSLe { } +#if FULLYMANAGED + /// + /// Creates an class. + /// + /// The MQTT client to use. + /// The Azure IoT name fully qualified (ex: youriothub.azure-devices.net). + /// The device ID which is the name of your device. + /// One of the SAS Key either primary, either secondary. + /// The default quality level delivery for the MQTT messages, default to the lower quality. + /// Azure certificate for the connection to Azure IoT Hub. + /// Azure Plug and Play model ID. + public DeviceClient(IMqttClient mqttc, string iotHubName, string deviceId, string sasKey, MqttQoSLevel qosLevel = MqttQoSLevel.AtLeastOnce, byte[] azureCert = null, string modelId = null) : + this(iotHubName, deviceId, sasKey, qosLevel, azureCert, modelId) + { + _mqttc = mqttc ?? throw new ArgumentNullException(); + + } +#endif + /// /// Creates an class. ///