public DocumentationMiddleware(
            [NotNull] RequestDelegate next,
            [NotNull] ILogger <DocumentationMiddleware> logger,
            [NotNull] IHostingEnvironment hostingEnv,
            [NotNull] IDocumentHandlerResolver documentHandlerResolver,
            [NotNull] DocumentationOptions options)
        {
            options.ResolveFileProvider(hostingEnv);

            _next       = next;
            _logger     = logger;
            _hostingEnv = hostingEnv;
            _options    = options;
            _documentHandlerResolver = documentHandlerResolver;
            ParseLayout();
        }
		public DocumentationMiddleware(
			[NotNull] RequestDelegate next,
			[NotNull] ILogger<DocumentationMiddleware> logger,
			[NotNull] IHostingEnvironment hostingEnv,
			[NotNull] IDocumentHandlerResolver documentHandlerResolver,
			[NotNull] DocumentationOptions options)
		{
			options.ResolveFileProvider(hostingEnv);

			_next = next;
			_logger = logger;
			_hostingEnv = hostingEnv;
			_options = options;
			_documentHandlerResolver = documentHandlerResolver;
			ParseLayout();
		}
 public static IApplicationBuilder UseDocumentation([NotNull] this IApplicationBuilder app, [NotNull] IDocumentHandlerResolver documentHandlerResolver, [NotNull] DocumentationOptions options)
 {
     return(app.UseMiddleware <DocumentationMiddleware>(documentHandlerResolver, options));
 }