예제 #1
0
        private async Task <IEnumerable <Sensordata> > GetSensordatas()
        {
            var sensordatas = await _storage.GetSensordata(FILENAME);

            if (sensordatas == null)
            {
                await _storage.SaveSensorData(new Sensordata[] {
                    new Sensordata {
                        Id = 1, SensorId = "Deursensor", KlantId = "Frank", Value = "prioriteit", Timestamp = "10:00:00", Active = true
                    },
                    new Sensordata {
                        Id = 2, SensorId = "Deursensor", KlantId = "Frank", Value = "prioriteit", Timestamp = "10:01:00", Active = false
                    },
                    new Sensordata {
                        Id = 1, SensorId = "Medicatiesensor", KlantId = "Frank", Value = "prioriteit", Timestamp = "10:50:00", Active = true
                    }
                }
                                              , FILENAME);
            }

            return(sensordatas);
        }