Beispiel #1
0
 private void Run(CancellationToken cancellationToken)
 {
     LocalizationHelper.InitThread();
     try
     {
         using (QueryRequest.QueryLock.GetReadLock())
         {
             var queryResults = QueryResults.Empty
                                .SetParameters(QueryRequest.QueryParameters)
                                .SetSourceRows(RowSource.ListRowItems());
             queryResults = RunAll(cancellationToken, queryResults);
             QueryRequest.SetFinalQueryResults(queryResults);
         }
     }
     catch (OperationCanceledException)
     {
     }
     catch (Exception e)
     {
         if (!(e.InnerException is OperationCanceledException))
         {
             QueryRequest.OnUnhandledException(e);
         }
     }
 }
Beispiel #2
0
 private void Reset()
 {
     lock (this)
     {
         Stop();
         SourceRowItems = ImmutableList.ValueOf(RowSource.ListRowItems());
         EnsureRunning();
     }
 }
Beispiel #3
0
 public void Start()
 {
     lock (this)
     {
         if (null != _cancellationTokenSource)
         {
             throw new InvalidOperationException();
         }
         RowSource.RowSourceChanged += RowSourceChanged;
         _rootCancellationToken.Register(() => RowSource.RowSourceChanged -= RowSourceChanged);
         SourceRowItems = ImmutableList.ValueOf(RowSource.ListRowItems());
         EnsureRunning();
     }
 }
Beispiel #4
0
        private void Run()
        {
            try
            {
                var queryResults = QueryResults.Empty
                                   .SetParameters(QueryRequest.QueryParameters)
                                   .SetSourceRows(RowSource.ListRowItems());

                queryResults = RunAll(QueryRequest.CancellationToken, queryResults);
                QueryRequest.SetFinalQueryResults(queryResults);
            }
            catch (OperationCanceledException)
            {
                // ignore
            }
            catch (Exception ex)
            {
                QueryRequest.OnUnhandledException(ex);
            }
        }