protected async Task InitAsync(CancellationToken token) { if (QueryOperation != null) { return; } var beforeQueryExecutedEventArgs = new BeforeQueryExecutedEventArgs(TheSession, this); TheSession.OnBeforeQueryExecutedInvoke(beforeQueryExecutedEventArgs); QueryOperation = InitializeQueryOperation(); await ExecuteActualQueryAsync(token).ConfigureAwait(false); }
protected void InitSync() { if (QueryOperation != null) { return; } var beforeQueryExecutedEventArgs = new BeforeQueryExecutedEventArgs(TheSession, this); TheSession.OnBeforeQueryExecutedInvoke(beforeQueryExecutedEventArgs); QueryOperation = InitializeQueryOperation(); ExecuteActualQuery(); }