Skip to content

Commit 386e7f2

Browse files
authored
Fix wrong spelled event name TwinUpated (#185)
1 parent c7c8067 commit 386e7f2

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Reporting Plug & Play properties is supported. He is a comprehensive example and
116116
```csharp
117117
const string TargetTemerature = "targetTemperature";
118118
DeviceClient azureIoT = new DeviceClient(Secrets.IotHub, Secrets.DeviceName, Secrets.SasKey, azureCert: new X509Certificate(Resource.GetBytes(Resource.BinaryResources.AzureRoot)), modelId: "dtmi:com:example:Thermostat;1");
119-
azureIoT.TwinUpated += AzureTwinUpdated;
119+
azureIoT.TwinUpdated += AzureTwinUpdated;
120120
azureIoT.Open();
121121

122122
void AzureTwinUpdated(object sender, TwinUpdateEventArgs e)
@@ -192,11 +192,11 @@ Note: the function will return false if the twin reception confirmation is not c
192192
You can also register for any twin update:
193193

194194
```csharp
195-
azureIoT.TwinUpated += TwinUpdatedEvent;
195+
azureIoT.TwinUpdated += TwinUpdatedEvent;
196196

197197
void TwinUpdatedEvent(object sender, TwinUpdateEventArgs e)
198198
{
199-
Debug.WriteLine($"Twin update received: {e.Twin.Count}");
199+
Debug.WriteLine($"Twin update received: {e.Twin.Count}");
200200
}
201201
```
202202

nanoFramework.Azure.Devices.Client/DeviceClient.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class DeviceClient : IDisposable
4444
/// <summary>
4545
/// Device twin updated event.
4646
/// </summary>
47-
public event TwinUpdated TwinUpated;
47+
public event TwinUpdated TwinUpdated;
4848

4949
/// <summary>
5050
/// Status change event.
@@ -67,7 +67,6 @@ public class DeviceClient : IDisposable
6767
/// <param name="azureCert">Azure certificate for the connection to Azure IoT Hub.</param>
6868
/// <param name="modelId">Azure Plug and Play model ID.</param>
6969
public DeviceClient(string iotHubName, string deviceId, string moduleId, string sasKey, MqttQoSLevel qosLevel = MqttQoSLevel.AtLeastOnce, X509Certificate azureCert = null, string modelId = null)
70-
7170
{
7271
_clientCert = null;
7372
_iotHubName = iotHubName;
@@ -416,7 +415,7 @@ private void ClientMqttMsgReceived(object sender, MqttMsgPublishEventArgs e)
416415
}
417416
else if (e.Topic.StartsWith("$iothub/twin/PATCH/properties/desired/"))
418417
{
419-
TwinUpated?.Invoke(this, new TwinUpdateEventArgs(new TwinCollection(message)));
418+
TwinUpdated?.Invoke(this, new TwinUpdateEventArgs(new TwinCollection(message)));
420419
_ioTHubStatus.Status = Status.TwinUpdateReceived;
421420
_ioTHubStatus.Message = string.Empty;
422421
StatusUpdated?.Invoke(this, new StatusUpdatedEventArgs(_ioTHubStatus));

0 commit comments

Comments
 (0)