Skip to content

Commit

Permalink
Fix wrong spelled event name TwinUpated (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeveen authored May 21, 2022
1 parent c7c8067 commit 386e7f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Reporting Plug & Play properties is supported. He is a comprehensive example and
```csharp
const string TargetTemerature = "targetTemperature";
DeviceClient azureIoT = new DeviceClient(Secrets.IotHub, Secrets.DeviceName, Secrets.SasKey, azureCert: new X509Certificate(Resource.GetBytes(Resource.BinaryResources.AzureRoot)), modelId: "dtmi:com:example:Thermostat;1");
azureIoT.TwinUpated += AzureTwinUpdated;
azureIoT.TwinUpdated += AzureTwinUpdated;
azureIoT.Open();

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

```csharp
azureIoT.TwinUpated += TwinUpdatedEvent;
azureIoT.TwinUpdated += TwinUpdatedEvent;

void TwinUpdatedEvent(object sender, TwinUpdateEventArgs e)
{
Debug.WriteLine($"Twin update received: {e.Twin.Count}");
Debug.WriteLine($"Twin update received: {e.Twin.Count}");
}
```

Expand Down
5 changes: 2 additions & 3 deletions nanoFramework.Azure.Devices.Client/DeviceClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class DeviceClient : IDisposable
/// <summary>
/// Device twin updated event.
/// </summary>
public event TwinUpdated TwinUpated;
public event TwinUpdated TwinUpdated;

/// <summary>
/// Status change event.
Expand All @@ -67,7 +67,6 @@ public class DeviceClient : IDisposable
/// <param name="azureCert">Azure certificate for the connection to Azure IoT Hub.</param>
/// <param name="modelId">Azure Plug and Play model ID.</param>
public DeviceClient(string iotHubName, string deviceId, string moduleId, string sasKey, MqttQoSLevel qosLevel = MqttQoSLevel.AtLeastOnce, X509Certificate azureCert = null, string modelId = null)

{
_clientCert = null;
_iotHubName = iotHubName;
Expand Down Expand Up @@ -416,7 +415,7 @@ private void ClientMqttMsgReceived(object sender, MqttMsgPublishEventArgs e)
}
else if (e.Topic.StartsWith("$iothub/twin/PATCH/properties/desired/"))
{
TwinUpated?.Invoke(this, new TwinUpdateEventArgs(new TwinCollection(message)));
TwinUpdated?.Invoke(this, new TwinUpdateEventArgs(new TwinCollection(message)));
_ioTHubStatus.Status = Status.TwinUpdateReceived;
_ioTHubStatus.Message = string.Empty;
StatusUpdated?.Invoke(this, new StatusUpdatedEventArgs(_ioTHubStatus));
Expand Down

0 comments on commit 386e7f2

Please sign in to comment.