public async Task Invoke(HttpContext httpContext)
        {
            var shellSettings = httpContext.RequestServices.GetService <ShellSettings>();

            _orchardHost.BeginRequest(shellSettings);
            await _next.Invoke(httpContext).ContinueWith(x => {
                _orchardHost.EndRequest(shellSettings);
            });
        }
        public async Task Invoke(HttpContext httpContext)
        {
            var shellSettings = httpContext.RequestServices.GetService <ShellSettings>();

            _orchardHost.BeginRequest(shellSettings);
            httpContext.Response.Headers.Append("X-Generator", "Orchard");
            await _next.Invoke(httpContext).ContinueWith(x => {
                _orchardHost.EndRequest(shellSettings);
            });
        }
        public async Task Invoke(HttpContext httpContext, ShellSettings shellSettings)
        {
            _orchardShellHost.BeginRequest(shellSettings);

            httpContext.Response.Headers.Append("X-Generator", "Orchard");

            await _next.Invoke(httpContext);

            _orchardShellHost.EndRequest(shellSettings);
        }