Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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));
        }