C# Class Naif.Blog.Framework.ApplicationContextMiddleware

The ApplicationContextMiddleware component processes the request to built the ApplicationContext object used for the duration of the request. The IApplicationContext object is passed in by Dependency Injection with a "scoped" lifetime, ensuring that a new object is created for each request.
Mostrar archivo Open project: cnurse/Naif.Blog

Public Methods

Method Description
ApplicationContextMiddleware ( RequestDelegate next, IHostingEnvironment env, IMemoryCache memoryCache, ILoggerFactory loggerFactory ) : Microsoft.AspNetCore.Hosting
Invoke ( HttpContext context, IApplicationContext appContext ) : System.Threading.Tasks.Task

Private Methods

Method Description
GetBlogs ( ) : IEnumerable

Method Details

ApplicationContextMiddleware() public method

public ApplicationContextMiddleware ( RequestDelegate next, IHostingEnvironment env, IMemoryCache memoryCache, ILoggerFactory loggerFactory ) : Microsoft.AspNetCore.Hosting
next RequestDelegate
env IHostingEnvironment
memoryCache IMemoryCache
loggerFactory ILoggerFactory
return Microsoft.AspNetCore.Hosting

Invoke() public method

public Invoke ( HttpContext context, IApplicationContext appContext ) : System.Threading.Tasks.Task
context HttpContext
appContext IApplicationContext
return System.Threading.Tasks.Task