private void OnDoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            if (worker == null)
            {
                return;
            }

            _result = new Dictionary <ExternalCatalogBook, double>();

            int count = 0;

            foreach (var r in _clusterResult)
            {
                if (worker.CancellationPending)
                {
                    e.Cancel = true;
                    break;
                }
                if (!CatalogProxy.IsPresentInCatalog(r.Key.Title))
                {
                    _result.Add(r.Key, r.Value);
                }
                count++;
                if (count % ReportValue == 0)
                {
                    worker.ReportProgress(count, BackgroundWorkerState.CatalogCheckerReportProgress);
                }
            }
        }
        private void OnDoWork(object sender, DoWorkEventArgs e)
        {
            BackgroundWorker worker = sender as BackgroundWorker;

            if (worker == null)
            {
                return;
            }

            _runWhenReady = false;

            int size = CatalogProxy.GetLogSize();

            worker.ReportProgress(size, BackgroundWorkerState.ActionAnalyzerInitialize);

            CatalogProxy.QueryLog(ref _actionAnalyzer, ReportValue, ref worker, ref e);
        }
예제 #3
0
 public SearchRequest(string query, string session)
 {
     Session = session;
     CatalogProxy.ParseSearchRequest(query, out IsInitialized, ref Parameters);
 }