Refactor SensorTelemetry to use builder method

This commit is contained in:
Denis-Cosmin Nutiu 2019-11-25 11:40:17 +02:00
parent 4db467f221
commit 651c1d6a56

View file

@ -11,12 +11,8 @@ namespace NucuCar.Sensors.Telemetry
{ {
if (configuration.ServiceEnabled) if (configuration.ServiceEnabled)
{ {
Publisher = new TelemetryPublisherAzure(new TelemetryPublisherBuilderOptions() Publisher = TelemetryPublisherAzure.CreateFromConnectionString(configuration.ConnectionString,
{ "NucuCar.Sensors", logger);
ConnectionString = configuration.ConnectionString,
TelemetrySource = "NucuCar.Sensors",
Logger = logger
});
} }
else else
{ {