Util.Cleanup doesn't seem to be getting executed
I can't seem to get the Util.Cleanup event to fire. Here is the query I am running to test with:
async Task Main() { var cts = new CancellationTokenSource(); Util.Cleanup += (_, _) => { MessageBox.Show("Query cancelled."); "Query cancelled.".Dump(); cts.Cancel(); }; while (!cts.IsCancellationRequested) { await Task.Delay(100, cts.Token); } }
Comments
Util.Cleanup is fired between query executions, but not on cancellation.
To subscribe to cancellation use this.QueryCancelToken.Register(...)