NucuCar/NucuCar.Sensors/Telemetry/TelemetryConfig.cs
2019-11-24 18:40:42 +02:00

19 lines
No EOL
623 B
C#

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<bool>("Telemetry:Enabled");
PublishInterval = configuration.GetValue<int>("Telemetry:PublishInterval");
ConnectionString = configuration.GetValue<string>("Telemetry:ConnectionString");
}
}
}