Esempio n. 1
0
        static void Update()
        {
            Console.WriteLine("Digite o Número Serial");
            var serialNumber = Console.ReadLine();

            Console.WriteLine();

            Console.WriteLine("Digite o Estado");
            Console.WriteLine();
            Console.WriteLine("0 - Desconectado");
            Console.WriteLine("1 - Conectado");
            Console.WriteLine("2 - Armado");
            var switchState = Console.ReadLine();

            Console.WriteLine();

            UpdateEndpointCommand command = new UpdateEndpointCommand(
                serialNumber,
                (EEndpointState)Enum.GetValues(typeof(EEndpointState)).GetValue(int.Parse(switchState.ToString())));

            GenericCommandResult result = _service.Put("v1/endpoints", command);

            Console.WriteLine(result.Message);
        }