Exemplo n.º 1
0
        private static Contracts.Models.TrackerData CreateTrakerData(Company company, Tracker1 tracker)
        {
            var aggregatedTemperature = AggregateCrumbData("Temperature", tracker);
            var aggregatedHumidty     = AggregateCrumbData("Humidty", tracker);

            var normalizedTracker = new NormilizedTracker {
                TrackerId = tracker.Id, TrackerName = tracker.Model
            };

            return(TrackerDataNormalizer.CreateTrakerData(company, normalizedTracker, aggregatedTemperature, aggregatedHumidty));
        }
        private static Contracts.Models.TrackerData CreateTrakerData(Company company, Device2 device)
        {
            var aggregatedTemperature = AggregateCrumbData("TEMP", device);
            var aggregatedHumidty     = AggregateCrumbData("HUM", device);

            var normalizedTracker = new NormilizedTracker {
                TrackerId = device.DeviceID, TrackerName = device.Name
            };

            return(TrackerDataNormalizer.CreateTrakerData(company, normalizedTracker, aggregatedTemperature, aggregatedHumidty));
        }