public async Task <bool> ConnectNetworkAsync() { Debug.WriteLine("Connect start!"); return(await WorkAsync( x => _worker.ConnectNetworkAsync(x, _workingTimeoutDuration), x => Profiles.Contains(x) && x.IsConnected)); }
public Task <bool> ConnectNetworkAsync(ProfileItem targetProfile, bool isManual = true) { Debug.WriteLine("Connect start!"); if (isManual) { EngagesPriority.Value = false; } return(WorkAsync(targetProfile, x => _worker.ConnectNetworkAsync(x, _connectTimeout))); }