internal async Task <List <Schedule> > GetSchedulesInternalAsync(ScheduleParameters parameters) { var schedules = await ObjectEngine.GetObjectsAsync <Schedule>(parameters).ConfigureAwait(false); await Task.WhenAll(schedules.Select(async schedule => { var response = await GetObjectPropertiesRawInternalAsync(schedule.Id, ObjectType.Schedule).ConfigureAwait(false); ResponseParser.LoadTimeTable(schedule, response); })).ConfigureAwait(false); return(schedules); }
internal async Task <List <SensorHistoryData> > GetSensorHistoryInternalAsync(SensorHistoryParameters parameters, CancellationToken token) { var items = await ObjectEngine.GetObjectsAsync <SensorHistoryData>(parameters, responseParser : m => ResponseParser.GetSensorHistoryResponseAsync(m, LogLevel, RequestEngine.IsDirty), token : token).ConfigureAwait(false); return(ResponseParser.ParseSensorHistoryResponse(items, parameters.SensorId)); }
internal async Task <List <SensorHistoryData> > GetSensorHistoryInternalAsync(SensorHistoryParameters parameters, CancellationToken token) { var items = await ObjectEngine.GetObjectsAsync <SensorHistoryData>(parameters, ResponseParser.ValidateSensorHistoryResponse, token : token).ConfigureAwait(false); return(ResponseParser.ParseSensorHistoryResponse(items, parameters.SensorId)); }