コード例 #1
0
        private (SensorEmulator emulator, PortableSensor sensor) GetPortableFakeSensor(string guid)
        {
            var apiKey         = CryptoHelper.GenerateApiKey();
            var sensorEmulator = new SensorEmulator(guid, _appSettings.ServerUrl, apiKey, typeof(PortableSensor));
            var sensor         = new PortableSensor
            {
                ApiKey = apiKey
            };

            return(sensorEmulator, sensor);
        }
コード例 #2
0
        private (SensorEmulator emulator, StaticSensor sensor) GetStaticFakeSensor(string guid)
        {
            var apiKey         = CryptoHelper.GenerateApiKey();
            var sensorEmulator = new SensorEmulator(guid, _appSettings.ServerUrl, apiKey, typeof(StaticSensor));
            var sensor         = new StaticSensor
            {
                ApiKey    = apiKey,
                Latitude  = sensorEmulator.Latitude,
                Longitude = sensorEmulator.Longitude
            };

            return(sensorEmulator, sensor);
        }