private void CheckActionIsSchedulable() { if (AnarchyAction.IsNotOfType <ICauseScheduledAnarchy>()) { throw new UnschedulableActionException(); } }
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; } }