public Assets(IAssetsConfiguration config) { if (config.CompilerConfiguration == null) { throw new ArgumentException("The compilers were not configured"); } if (config.SourceConfiguration == null) { throw new ArgumentException("The sources were not configured"); } _config = config; _jsManager = config.SourceConfiguration.GetSourceManager(".js"); _cssManager = config.SourceConfiguration.GetSourceManager(".css"); if(config.RouteHandlerFunction == null) { _routeHandler = (pile, file) => new DefaultRouteHandler(pile, file, config); } else { _routeHandler = (pile, file) => config.RouteHandlerFunction(pile, file, config); } }
public DefaultHttpHandler(FileInfo info, IAssetsConfiguration config) { _file = info; _config = config; }
public DefaultRouteHandler(string pile, FileInfo info, IAssetsConfiguration config) { _handler = new DefaultHttpHandler(info, config); }