public async Task <TResult> QueryAsync <TResult>(Query <TResult> query)
        {
            var ctx = new ExecuteQueriesInvocationContext(Principal, _messageInvoker);
            await _messageInvoker.ProcessAsync(ctx, query);

            return((TResult)ctx.Replies.First().Body);
        }
示例#2
0
        public Task <TResult> QueryAsync <TResult>(Query <TResult> query)
        {
            //TODO: Send message on queue and wait for response in the reply queue (filtering on correlation-id)

            var ctx = new ExecuteQueriesInvocationContext(Principal, _messageInvoker);

            return(ctx.QueryAsync(query));
        }