public BackgroundQuery(RowSourceWrapper rowSource, TaskScheduler backgroundTaskScheduler, IQueryRequest queryRequest) { RowSource = rowSource; BackgroundTaskScheduler = backgroundTaskScheduler; QueryRequest = queryRequest; _rootCancellationToken = QueryRequest.CancellationToken; }
public Request(QueryRequestor queryRequestor, QueryLock queryLock, RowSourceWrapper rowSourceWrapper) { _queryRequestor = queryRequestor; RowSourceWrapper = rowSourceWrapper; QueryParameters = _queryRequestor.QueryParameters; // ReSharper disable PossiblyMistakenUseOfParamsMethod _cancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(queryLock.CancellationToken); // ReSharper restore PossiblyMistakenUseOfParamsMethod QueryLock = queryLock; }
public void Requery() { using (var lastRequest = _request) { _request = null; if (null == QueryParameters || null == QueryParameters.ViewInfo) { return; } RowSourceWrapper rowSourceWrapper; if (lastRequest != null && ReferenceEquals(lastRequest.RowSourceWrapper.WrappedRowSource, _bindingListView.RowSource)) { rowSourceWrapper = lastRequest.RowSourceWrapper; } else { rowSourceWrapper = new RowSourceWrapper(_bindingListView.RowSource); } _request = new Request(this, _bindingListView.QueryLock, rowSourceWrapper); _request.StartQuery(); } }
public ForegroundQuery(RowSourceWrapper rowSource, IQueryRequest queryRequest) { RowSource = rowSource; QueryRequest = queryRequest; }
public BackgroundQuery(RowSourceWrapper rowSource, IQueryRequest queryRequest) { RowSource = rowSource; QueryRequest = queryRequest; _rootCancellationToken = QueryRequest.CancellationToken; }