コード例 #1
0
        /// <inheritdoc/>
        public void Register(HttpMiddleware middleware)
        {
            if (pipeline.Any())
            {
                pipeline[pipeline.Count - 1].Next = middleware;
            }

            pipeline.Add(middleware);
        }
コード例 #2
0
 /// <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;
 }