August 2017
Intermediate to advanced
254 pages
6h 10m
English
In this section, we will create a device job to update the device twin properties:
var twin = new Twin(); twin.Properties.Desired["HighTemperature"] = "44"; twin.Properties.Desired["City"] = "Mumbai"; twin.ETag = "*"; return await jobClient.ScheduleTwinUpdateAsync(jobId, "deviceId='"+ deviceId + "'", twin, DateTime.Now, 10);
JobClient jobClient;JobClient jobClient;jobClient = JobClient.CreateFromConnectionString(abc.GetConnectionString());public async Task<JobResponse> MonitorJob(string jobId, JobClient jobClient){ return await jobClient.GetJobAsync(jobId); }