Exemple #1
0
        private static void Main()
        {
            var client = new DreamScreenClient();
            var source = new CancellationTokenSource();

            client.DeviceDiscovered += ProcessDevice;
            source.CancelAfter(TimeSpan.FromSeconds(5));
            client.StartDeviceDiscovery();
            var token = source.Token;

            while (!token.IsCancellationRequested)
            {
            }

            client.StopDeviceDiscovery();
            client.Dispose();
        }
Exemple #2
0
 public void Dispose()
 {
     _du?.Dispose();
     GC.SuppressFinalize(this);
 }