private void ExecuteActualQuery() { using (QueryOperation.EnterQueryContext()) { QueryOperation.LogQuery(); var command = QueryOperation.CreateRequest(); TheSession.RequestExecutor.Execute(command, TheSession.Context); QueryOperation.SetResult(command.Result); } InvokeAfterQueryExecuted(QueryOperation.CurrentQueryResults); }
private async Task ExecuteActualQueryAsync(CancellationToken token) { using (QueryOperation.EnterQueryContext()) { var command = QueryOperation.CreateRequest(); await TheSession.RequestExecutor.ExecuteAsync(command, TheSession.Context, token).ConfigureAwait(false); QueryOperation.SetResult(command.Result); } InvokeAfterQueryExecuted(QueryOperation.CurrentQueryResults); }