コード例 #1
0
 private void CheckActionIsSchedulable()
 {
     if (AnarchyAction.IsNotOfType <ICauseScheduledAnarchy>())
     {
         throw new UnschedulableActionException();
     }
 }
コード例 #2
0
        public async Task HandleRequest(HttpContext context, RequestDelegate next)
        {
            if (CanHandleRequest(context.Request.Path))
            {
                CheckActionIsNotStopping();

                var execution = AnarchyAction.HandleRequestAsync(context, next, _cancellationTokenSource.Token);
                _executionInstances.Add(execution);
                await execution;
            }
        }