AnsweredAssumed Answered

How to cancel from GeodatabaseFeatureTable QueryAsync task

Question asked by HuyHo on Dec 16, 2015

I have a GeodatabaseFeatureTable from which I am running some query against using the QueryAsync(QueryFilter) function.  In some cases, my query can take some time to finish and I would like to cancel the operation.  Unfortunately, the QueryAsync() function in this class does not provide a cancellation mechanism such as the QueryTask.ExecuteAsync(Query, CancellationToken).  How would one go about to cancel the execution of the GeodatabaseFeatureTable.QueryAsync() ?

 

        QueryFilter qFilter = new QueryFilter

        {

          WhereClause = whereClause

        };

        IEnumerable<Feature> returnedList = await _geoDbFeatureTable.QueryAsync(qFilter);

Outcomes