public async Task UpdateTwinsAsync(TwinsSearchRequest request, string patch) { var query = _registryManager.CreateQuery($"SELECT * FROM devices {request.WhereCondition}"); if (query != null) { var twinsInScope = await query.GetNextAsTwinAsync(); if (twinsInScope != null) { foreach (var item in twinsInScope) { UpdateTwinsAsync(item.DeviceId, item.ETag, patch); } } } }
public async Task UpdateTwinsAsync(TwinsSearchRequest request, string patch) { var query = _registryManager.CreateQuery($"SELECT * FROM devices {request.WhereCondition}"); if (query != null) { var twinsInScope = await query.GetNextAsTwinAsync().ConfigureAwait(false); if (twinsInScope != null) { foreach (var item in twinsInScope) #pragma warning disable 4014 { UpdateTwinsAsync(item.DeviceId, item.ETag, patch); } } #pragma warning restore 4014 } }