private async Task checkConnection(CancellationTokenSource cancel) { var adapters = await SsdpDiscovery.GetActiveAdaptersAsync(); discovery.TargetNetworkAdapters = adapters; while (!cancel.IsCancellationRequested) { SearchCamera(); SearchCds(); await Task.Delay(5000).ConfigureAwait(false); } }
private async Task checkConnection(CancellationTokenSource cancel) { var adapters = await SsdpDiscovery.GetActiveAdaptersAsync(); discovery.TargetNetworkAdapters = adapters; while (!cancel.IsCancellationRequested) { if (ApplicationSettings.GetInstance().QuickConnectionEnabled) { EstablishQuickConnectionToCamera(); } SearchCamera(); SearchCds(); await Task.Delay(5000).ConfigureAwait(false); } }