public async Task <IHttpActionResult> Delete([FromUri] string apiKey)
        {
            await _chaosConfigurationSettings.DeleteAsync(apiKey);

            _cacheInvalidator.Invalidate(apiKey);

            return(new StatusCodeResult(HttpStatusCode.NoContent, Request));
        }
示例#2
0
        public async Task <IHttpActionResult> Delete(string apiKey)
        {
            var tasks = new List <Task>()
            {
                _apiSettings.DeleteAsync(apiKey),
                _chaosConfigurationSettings.DeleteAsync(apiKey),
            };

            await Task.WhenAll(tasks);

            _cacheInvalidator.Invalidate(apiKey);

            return(new StatusCodeResult(HttpStatusCode.NoContent, Request));
        }