상속: IAssetsConfiguration
예제 #1
0
        public Assets(AssetsConfiguration 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 DefaultHandler(file, config).Execute;
            }
            else
            {
                _routeHandler = (pile, file) => config.RouteHandlerFunction(pile, file, config);
            }
        }
예제 #2
0
파일: Assets.cs 프로젝트: Santas/NodeAssets
 public static IAssets Initialise(Func<IAssetsConfiguration, IAssetsConfiguration> configFunc)
 {
     var config = new AssetsConfiguration();
     _assets = new Assets(configFunc(config));
     return _assets;
 }