Example #1
0
    private static async Task StartDeviceListening()
    {
        var rootDevice =

            _device = new Device(CreateRootDevice());

        var cts = new CancellationTokenSource();

        await _device.StartAsync(cts.Token);

        System.Console.WriteLine("Press any key to bye bye...");
        System.Console.ReadLine();

        await _device.ByeByeAsync();

        _device?.Dispose();
    }