using Microsoft.Extensions.Configuration; namespace NucuCar.Sensors.EnvironmentSensor { public class Bme680Config { public bool SensorEnabled { get; } public bool TelemetryEnabled { get; } public int MeasurementInterval { get; } public Bme680Config(IConfiguration configuration) { SensorEnabled = configuration.GetValue("EnvironmentSensor:Enabled"); TelemetryEnabled = configuration.GetValue("EnvironmentSensor:TelemetryEnabled"); MeasurementInterval = configuration.GetValue("EnvironmentSensor:MeasurementInterval"); } } }