Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Created November 29, 2013 20:26
Show Gist options
  • Select an option

  • Save beyond-code-github/7711463 to your computer and use it in GitHub Desktop.

Select an option

Save beyond-code-github/7711463 to your computer and use it in GitHub Desktop.
Sub-pipeline example
if (routeData.Pipeline.Any())
{
IAppBuilder branch = builder.New();
foreach (var middleware in routeData.Pipeline)
{
branch.Use(middleware);
}
branch.Use(typeof(RedirectMiddleware), this.next);
var continuation = (Func<IDictionary<string, object>, Task>)branch.Build(typeof(Func<IDictionary<string, object>, Task>));
await continuation(environment);
}
else
{
await this.next(environment);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment