using Microsoft.Extensions.Configuration; namespace NucuCar.Sensors.Telemetry { public class TelemetryConfig { public bool ServiceEnabled { get; } public int PublishInterval { get; } public string ConnectionString { get; } public TelemetryConfig(IConfiguration configuration) { ServiceEnabled = configuration.GetValue("Telemetry:Enabled"); PublishInterval = configuration.GetValue("Telemetry:PublishInterval"); ConnectionString = configuration.GetValue("Telemetry:ConnectionString"); } } }