예제 #1
0
        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);
        }
예제 #2
0
        protected void InitSync()
        {
            if (QueryOperation != null)
            {
                return;
            }

            var beforeQueryExecutedEventArgs = new BeforeQueryExecutedEventArgs(TheSession, this);

            TheSession.OnBeforeQueryExecutedInvoke(beforeQueryExecutedEventArgs);

            QueryOperation = InitializeQueryOperation();
            ExecuteActualQuery();
        }