@@ -80,10 +80,10 @@ public DeviceClient(string iotHubName, string deviceId, string sasKey, MqttQoSLe
8080 /// <summary>
8181 /// Creates an <see cref="DeviceClient"/> class.
8282 /// </summary>
83- /// <param name="iotHubName">The Azure IoT name fully qualified (ex : youriothub.azure-devices.net)</param>
84- /// <param name="deviceId">The device ID which is the name of your device.</param>
85- /// <param name="clientCert">The certificate to connect the device containing both public and private key .</param>
86- /// <param name="qosLevel">The default quality level delivery for the MQTT messages, default to the lower quality</param>
83+ /// <param name="iotHubName">Your Azure IoT Hub fully qualified domain name (example : youriothub.azure-devices.net). </param>
84+ /// <param name="deviceId">The device ID ( name of your device) .</param>
85+ /// <param name="clientCert">The certificate to connect the device ( containing both public and private keys) .</param>
86+ /// <param name="qosLevel">The default quality of assurance level for delivery for the MQTT messages (defaults to the lowest quality). </param>
8787 /// /// <param name="azureCert">Azure certificate for the connection to Azure IoT Hub</param>
8888 public DeviceClient ( string iotHubName , string deviceId , X509Certificate2 clientCert , MqttQoSLevel qosLevel = MqttQoSLevel . AtMostOnce , X509Certificate azureCert = null )
8989 {
@@ -106,7 +106,7 @@ public DeviceClient(string iotHubName, string deviceId, X509Certificate2 clientC
106106 public Twin LastTwin => _twin ;
107107
108108 /// <summary>
109- /// The latests status.
109+ /// The latest status.
110110 /// </summary>
111111 public IoTHubStatus IoTHubStatus => new IoTHubStatus ( _ioTHubStatus ) ;
112112
@@ -116,17 +116,17 @@ public DeviceClient(string iotHubName, string deviceId, X509Certificate2 clientC
116116 public MqttQoSLevel QosLevel { get ; set ; }
117117
118118 /// <summary>
119- /// True if the device connected
119+ /// True if the device connected.
120120 /// </summary>
121121 public bool IsConnected => ( _mqttc != null ) && _mqttc . IsConnected ;
122122
123123 /// <summary>
124- /// Open the connection with Azure IoT. This will connected to Azure IoT Hub the device .
124+ /// Open the connection with Azure IoT. This will initiate a connection from the device to the Azure IoT Hub instance .
125125 /// </summary>
126126 /// <returns></returns>
127127 public bool Open ( )
128128 {
129- // Creates MQTT Client with default port 8883 using TLS protocol
129+ // Creates MQTT Client usinf the default port of 8883 and the TLS 1.2 protocol
130130 _mqttc = new MqttClient (
131131 _iotHubName ,
132132 8883 ,
@@ -270,19 +270,19 @@ public bool UpdateReportedProperties(TwinCollection reported, CancellationToken
270270 /// <summary>
271271 /// Add a callback method.
272272 /// </summary>
273- /// <param name="methodCalback ">The callback method to add.</param>
274- public void AddMethodCallback ( MethodCalback methodCalback )
273+ /// <param name="methodCallback ">The callback method to add.</param>
274+ public void AddMethodCallback ( MethodCallback methodCallback )
275275 {
276- _methodCallback . Add ( methodCalback ) ;
276+ _methodCallback . Add ( methodCallback ) ;
277277 }
278278
279279 /// <summary>
280280 /// Remove a callback method.
281281 /// </summary>
282- /// <param name="methodCalback ">The callback method to remove.</param>
283- public void RemoveMethodCallback ( MethodCalback methodCalback )
282+ /// <param name="methodCallback ">The callback method to remove.</param>
283+ public void RemoveMethodCallback ( MethodCallback methodCallback )
284284 {
285- _methodCallback . Remove ( methodCalback ) ;
285+ _methodCallback . Remove ( methodCallback ) ;
286286 }
287287
288288 /// <summary>
@@ -371,7 +371,7 @@ private void ClientMqttMsgReceived(object sender, MqttMsgPublishEventArgs e)
371371 _ioTHubStatus . Status = Status . DirectMethodCalled ;
372372 _ioTHubStatus . Message = $ "{ method } /{ message } ";
373373 StatusUpdated ? . Invoke ( this , new StatusUpdatedEventArgs ( _ioTHubStatus ) ) ;
374- foreach ( MethodCalback mt in _methodCallback )
374+ foreach ( MethodCallback mt in _methodCallback )
375375 {
376376 string mtName = mt . Method . Name ;
377377 if ( mtName . Contains ( C9PatternMainStyle ) )
@@ -475,7 +475,7 @@ public void Dispose()
475475 {
476476 if ( _mqttc != null )
477477 {
478- // Making sure we unregister to events
478+ // Making sure we unregister the registered events
479479 _mqttc . MqttMsgPublishReceived -= ClientMqttMsgReceived ;
480480 _mqttc . MqttMsgPublished -= ClientMqttMsgPublished ;
481481 _mqttc . ConnectionClosed -= ClientConnectionClosed ;
0 commit comments