Пример #1
0
        public async Task <IActionResult> GetApiKeys(string appId)
        {
            var query = new ApiKeysQuery {
                AppId = appId
            };

            return(Ok(await _dispatcher.ExecuteQuery(query)));
        }
Пример #2
0
 public async Task <IActionResult> Get([FromQuery] AppQuery query)
 {
     return(Ok(await _dispatcher.ExecuteQuery(query)));
 }
Пример #3
0
        public async Task Should_call_handler()
        {
            var result = await _dispatcher.ExecuteQuery <PingQuery, string>(new PingQuery());

            result.ShouldBe("Pong");
        }
Пример #4
0
 public async Task <IActionResult> Get(string appId, [FromQuery] ContentCollectionQuery query)
 {
     query.AppId = appId;
     return(Ok(await _dispatcher.ExecuteQuery(query)));
 }
Пример #5
0
        public async Task Returns_response_from_PipelineContext()
        {
            var response = await _dispatcher.ExecuteQuery <HelloWorldQuery, string>(new HelloWorldQuery());

            response.ShouldBe("Hello World");
        }