/// <summary>
        /// Adds the DiagnosticsPageMiddleware to the pipeline with the given options.
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IBuilder UseDiagnosticsPage(this IBuilder builder, DiagnosticsPageOptions options)
        {
            if (builder == null)
            {
                throw new ArgumentNullException("builder");
            }

            return builder.Use(next => new DiagnosticsPageMiddleware(next, options).Invoke);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagnosticsPageMiddleware"/> class
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"></param>
 public DiagnosticsPageMiddleware(RequestDelegate next, DiagnosticsPageOptions options)
 {
     _next = next;
     _options = options;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DiagnosticsPageMiddleware"/> class
 /// </summary>
 /// <param name="next"></param>
 /// <param name="options"></param>
 public DiagnosticsPageMiddleware(RequestDelegate next, DiagnosticsPageOptions options)
 {
     _next    = next;
     _options = options;
 }
 /// <summary>
 /// Adds the DiagnosticsPageMiddleware to the pipeline with the given options.
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="options"></param>
 /// <returns></returns>
 public static IApplicationBuilder UseDiagnosticsPage([NotNull] this IApplicationBuilder builder, DiagnosticsPageOptions options)
 {
     return builder.Use(next => new DiagnosticsPageMiddleware(next, options).Invoke);
 }