Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
 public IDisposable EnterContext()
 {
     return(queryOperation.EnterQueryContext());
 }