C# Class React.AspNet.BabelFileMiddleware

Enables serving static JavaScript files compiled via Babel. Wraps around StaticFileMiddleware.
Show file Open project: reactjs/React.NET

Public Methods

Method Description
BabelFileMiddleware ( RequestDelegate next, BabelFileOptions options, IHostingEnvironment hostingEnv, ILoggerFactory loggerFactory ) : System

Creates a new instance of the BabelFileMiddleware.

Invoke ( HttpContext context ) : System.Threading.Tasks.Task

Processes a request to determine if it matches a known JavaScript file, and if so, transforms it via Babel and serves it

Private Methods

Method Description
CreateFileMiddleware ( IBabel babel ) : StaticFileMiddleware

Creates the internal StaticFileMiddleware used to serve files.

Method Details

BabelFileMiddleware() public method

Creates a new instance of the BabelFileMiddleware.
public BabelFileMiddleware ( RequestDelegate next, BabelFileOptions options, IHostingEnvironment hostingEnv, ILoggerFactory loggerFactory ) : System
next RequestDelegate The next middleware in the pipeline.
options BabelFileOptions The configuration options.
hostingEnv IHostingEnvironment The hosting environment.
loggerFactory ILoggerFactory An instance used to create loggers.
return System

Invoke() public method

Processes a request to determine if it matches a known JavaScript file, and if so, transforms it via Babel and serves it
public Invoke ( HttpContext context ) : System.Threading.Tasks.Task
context HttpContext ASP.NET HTTP context
return System.Threading.Tasks.Task