/// <inheritdoc/> public void Register(HttpMiddleware middleware) { if (pipeline.Any()) { pipeline[pipeline.Count - 1].Next = middleware; } pipeline.Add(middleware); }
/// <summary> /// Initializes a new instance of the <see cref="HttpMiddleware"/> class. /// </summary> /// <param name="next">Next <see cref="HttpMiddleware"/> to build a middleware pipeline.</param> protected HttpMiddleware(HttpMiddleware next) { Next = next; }