public async Task InvokeAsync(HttpContext context, IWorkflowHost workflowHost, IHttpWorkflowCache httpWorkflowCache) { var requestPath = new Uri(context.Request.Path.ToString(), UriKind.Relative); var cancellationToken = context.RequestAborted; var workflows = await httpWorkflowCache.GetWorkflowsByPathAsync(requestPath, cancellationToken).ToListAsync(); if (!workflows.Any()) { await next(context); } else { await InvokeWorkflows(workflowHost, workflows, requestPath, cancellationToken); } }
public HttpWorkflowCacheInitializer(IWorkflowStore workflowStore, IHttpWorkflowCache httpWorkflowCache) { this.workflowStore = workflowStore; this.httpWorkflowCache = httpWorkflowCache; }