Skip to content

Commit afdc11b

Browse files
authored
Add missing constructor in FullyManaged (#301)
1 parent 1a22437 commit afdc11b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

nanoFramework.Azure.Devices.Client/DeviceClient.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,25 @@ public DeviceClient(string iotHubName, string deviceId, string sasKey, MqttQoSLe
183183
{
184184
}
185185

186+
#if FULLYMANAGED
187+
/// <summary>
188+
/// Creates an <see cref="DeviceClient"/> class.
189+
/// </summary>
190+
/// <param name="mqttc">The MQTT client to use.</param>
191+
/// <param name="iotHubName">The Azure IoT name fully qualified (ex: youriothub.azure-devices.net).</param>
192+
/// <param name="deviceId">The device ID which is the name of your device.</param>
193+
/// <param name="sasKey">One of the SAS Key either primary, either secondary.</param>
194+
/// <param name="qosLevel">The default quality level delivery for the MQTT messages, default to the lower quality.</param>
195+
/// <param name="azureCert">Azure certificate for the connection to Azure IoT Hub.</param>
196+
/// <param name="modelId">Azure Plug and Play model ID.</param>
197+
public DeviceClient(IMqttClient mqttc, string iotHubName, string deviceId, string sasKey, MqttQoSLevel qosLevel = MqttQoSLevel.AtLeastOnce, byte[] azureCert = null, string modelId = null) :
198+
this(iotHubName, deviceId, sasKey, qosLevel, azureCert, modelId)
199+
{
200+
_mqttc = mqttc ?? throw new ArgumentNullException();
201+
202+
}
203+
#endif
204+
186205
/// <summary>
187206
/// Creates an <see cref="DeviceClient"/> class.
188207
/// </summary>

0 commit comments

Comments
 (0)