private static object RunVerifyAndReturnExitCode(VerifyOptions opts) { if (!configurationHelper.ReadConfig()) { return(false); } var twin = iotDeviceHelper.QueryDeviceTwin(opts.DevEui, configurationHelper).Result; if (twin != null) { Console.WriteLine(); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine($"DevEUI: {opts.DevEui}"); Console.WriteLine(TwinToString(twin)); Console.ResetColor(); return(iotDeviceHelper.VerifyDeviceTwin(opts.DevEui, opts.NetId, twin, configurationHelper)); } else { StatusConsole.WriteLine(MessageType.Error, $"Could not get data for device {opts.DevEui}."); return(false); } }
private static async Task <bool> RunVerifyAndReturnExitCode(VerifyOptions opts) { if (!configurationHelper.ReadConfig()) { return(false); } var twin = await iotDeviceHelper.QueryDeviceTwin(opts.DevEui, configurationHelper); if (twin != null) { StatusConsole.WriteTwin(opts.DevEui, twin); return(iotDeviceHelper.VerifyDeviceTwin(opts.DevEui, opts.NetId, twin, configurationHelper, true)); } else { StatusConsole.WriteLogLine(MessageType.Error, $"Could not get data for device {opts.DevEui}."); return(false); } }