Пример #1
0
        internal int GetSensorHistoryTotals(SensorHistoryParameters parameters)
        {
            parameters.Count = 0;

            var data = ObjectEngine.GetObjectsRaw <SensorHistoryData>(parameters, responseParser: m => ResponseParser.GetSensorHistoryResponse(m, LogLevel, RequestEngine.IsDirty));

            parameters.GetParameters().Remove(Parameter.Count);

            return(Convert.ToInt32(data.TotalCount));
        }
Пример #2
0
        internal Tuple <List <SensorHistoryData>, int> GetSensorHistoryInternal(SensorHistoryParameters parameters)
        {
            var raw = ObjectEngine.GetObjectsRaw <SensorHistoryData>(parameters, responseParser: m => ResponseParser.GetSensorHistoryResponse(m, LogLevel, RequestEngine.IsDirty));

            var data = ResponseParser.ParseSensorHistoryResponse(raw.Items, parameters.SensorId);

            return(Tuple.Create(data, raw.TotalCount));
        }