Exemple #1
0
        public void Execute()
        {
            Console.WriteLine($"Polling device: {_deviceId}");
            Console.Write(" - List resources ...");

            var discovery    = new DiscoveryFactory().Create();
            var deviceResult = discovery.EnumerateResources(_deviceId);

            Console.WriteLine();

            if (deviceResult.Status != ResourceEnumerationResult.EnumerationStatus.Success)
            {
                Console.WriteLine($"Operation has failed due to status: {deviceResult.Status}");
            }
            else
            {
                PollAttributes(deviceResult.Device);
            }
        }
Exemple #2
0
        public void Execute()
        {
            Console.Write($"Listing resources of device Id: {_deviceId} ...");

            var discovery    = new DiscoveryFactory().Create();
            var deviceResult = discovery.EnumerateResources(_deviceId);

            Console.WriteLine();

            if (deviceResult.Status != ResourceEnumerationResult.EnumerationStatus.Success)
            {
                Console.WriteLine($"Operation has failed due to status: {deviceResult.Status}");

                if (deviceResult.Device != null)
                {
                    DumpDevice(deviceResult.Device);
                }
            }
            else
            {
                Dump(deviceResult.Device);
            }
        }