示例#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");
        }