public void CacheDatabases(SchemaRepository repo) { //if (_taskSource != null) //{ // _taskSource.TrySetCanceled(); //} //_taskSource = new TaskCompletionSource<int>(); //_worker = new BackgroundWorker(); //_worker.DoWork += (o, a) => //{ // repo.GetDatabases(); //}; //_worker.RunWorkerCompleted += (o, a) => { // _taskSource.TrySetResult(0); //}; //_worker.RunWorkerAsync(); repo.GetDatabases(); //return _taskSource.Task; }
protected bool DatabaseExists(string database, SchemaRepository repo) { return(repo.GetDatabases().Contains(database, StringComparer.CurrentCultureIgnoreCase)); }