2019-11-23 14:09:44 +00:00
|
|
|
|
using CommandLine;
|
2019-11-23 14:13:27 +00:00
|
|
|
|
using NucuCar.TestClient.Sensors;
|
|
|
|
|
using NucuCar.TestClient.Telemetry;
|
2019-11-10 12:38:40 +00:00
|
|
|
|
|
|
|
|
|
namespace NucuCar.TestClient
|
|
|
|
|
{
|
2019-11-17 14:52:43 +00:00
|
|
|
|
internal class Program
|
2019-11-10 12:38:40 +00:00
|
|
|
|
{
|
2019-11-10 14:02:50 +00:00
|
|
|
|
// ReSharper disable once ArrangeTypeMemberModifiers
|
2019-11-23 14:09:44 +00:00
|
|
|
|
static int Main(string[] args)
|
2019-11-10 12:38:40 +00:00
|
|
|
|
{
|
2019-11-23 14:09:44 +00:00
|
|
|
|
return Parser.Default
|
|
|
|
|
.ParseArguments<SensorsCmd.SensorsCmdOptions, AzureTelemetryPublishCmd.AzureTelemetryPublishOptions,
|
|
|
|
|
AzureTelemetryReaderCmd.AzureTelemetryReaderOpts>(args)
|
|
|
|
|
.MapResult(
|
|
|
|
|
(SensorsCmd.SensorsCmdOptions opts) =>
|
|
|
|
|
{
|
|
|
|
|
SensorsCmd.RunSensorsTestCommand(opts).GetAwaiter().GetResult();
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
(AzureTelemetryPublishCmd.AzureTelemetryPublishOptions opts) =>
|
|
|
|
|
{
|
|
|
|
|
AzureTelemetryPublishCmd.RunAzurePublisherTelemetryTest(opts).GetAwaiter().GetResult();
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
(AzureTelemetryReaderCmd.AzureTelemetryReaderOpts opts) =>
|
|
|
|
|
{
|
|
|
|
|
AzureTelemetryReaderCmd.RunAzureTelemetryReaderTest(opts).GetAwaiter().GetResult();
|
|
|
|
|
return 0;
|
|
|
|
|
},
|
|
|
|
|
errs => 1);
|
2019-11-10 12:38:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|