// For some reason, calls to this function takes 1 minute. public async Task UpdateReportedPropertiesAsync(string name, object value, LogDelegateType Log) { Log("Updating '" + name + "'..."); TwinCollection azureCollection = new TwinCollection(); azureCollection[name] = value; try { await _deviceClient.UpdateReportedPropertiesAsync(azureCollection); } catch (Exception e) { Log("Error: failed to update reported properties. " + e.Message); } }
public async Task UpdateReportedPropertiesAsync(JObject reportedObject, LogDelegateType Log) { Log("Updating reported properties..."); TwinCollection azureCollection = new TwinCollection(); foreach (JProperty p in reportedObject.Children()) { azureCollection[p.Name] = p.Value; } try { await _deviceClient.UpdateReportedPropertiesAsync(azureCollection); } catch (Exception e) { Log("Error: failed to update reported properties. " + e.Message); } }
public IrcLogger(LogDelegateType logDelegate) { this.logDelegate = logDelegate; }