Пример #1
0
        /// <exclude />
        public ScriptLoader(string type, string directive = null, bool updateManagerDisabled = false)
        {
            _ctx  = HttpContext.Current;
            _type = type;
            _updateManagerDisabled = updateManagerDisabled;

            if (directive == "compile")
            {
                _mode = CompositeScriptMode.COMPILE;
            }
            else if (CookieHandler.Get("mode") == "develop")
            {
                _mode = CompositeScriptMode.DEVELOP;
            }
            else
            {
                _mode = CompositeScriptMode.OPERATE;
            }

            string folderPath = Path.Combine(_ctx.Request.PhysicalApplicationPath, "Composite");

            switch (type)
            {
            case "top":
                _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath);

                break;

            case "sub":
                _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath);
                break;
            }
        }
    /**
     * Notice that automatic compression doesn't work!
     */
    protected void Page_Load(object sender, EventArgs e)
    {
        if (directive == "compile")
        {
            _mode = CompositeScriptMode.COMPILE;
        }
        else if (CookieHandler.Get("mode") == "develop")
        {
            _mode = CompositeScriptMode.DEVELOP;
        }
        else
        {
            _mode = CompositeScriptMode.OPERATE;
        }

        string folderPath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Composite");

        switch (type)
        {
            case "top":
                _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath);

                break;
            case "sub":
                _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath);
                break;
        }
    }
    /**
     * Notice that automatic compression doesn't work!
     */
    protected void Page_Load(object sender, EventArgs e)
    {
        if (directive == "compile")
        {
            _mode = CompositeScriptMode.COMPILE;
        }
        else if (CookieHandler.Get("mode") == "develop")
        {
            _mode = CompositeScriptMode.DEVELOP;
        }
        else
        {
            _mode = CompositeScriptMode.OPERATE;
        }

        string folderPath = Path.Combine(HttpContext.Current.Request.PhysicalApplicationPath, "Composite");

        switch (type)
        {
        case "top":
            _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath);

            break;

        case "sub":
            _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath);
            break;
        }
    }
Пример #4
0
        /// <exclude />
        public ScriptLoader(string type, string directive = null, bool updateManagerDisabled = false)
        {
            _ctx = HttpContext.Current;
            _type = type;
            _updateManagerDisabled = updateManagerDisabled;

            if (directive == "compile")
            {
                _mode = CompositeScriptMode.COMPILE;
            }
            else if (CookieHandler.Get("mode") == "develop")
            {
                _mode = CompositeScriptMode.DEVELOP;
            }
            else
            {
                _mode = CompositeScriptMode.OPERATE;
            }

            string folderPath = Path.Combine(_ctx.Request.PhysicalApplicationPath, "Composite");

            switch (type)
            {
                case "top":
                    _defaultscripts = ScriptHandler.GetTopScripts(_mode, folderPath);

                    break;
                case "sub":
                    _defaultscripts = ScriptHandler.GetSubScripts(_mode, folderPath);
                    break;
            }
        }
Пример #5
0
        /// <exclude />
        public static IEnumerable <string> GetSubScripts(CompositeScriptMode scriptMode, string folderPath)
        {
            IEnumerable <string> result = GetStrings("sub", scriptMode.ToString().ToLower(), folderPath);

            return(result);
        }
Пример #6
0
        /// <exclude />
        public static IEnumerable<string> GetSubScripts(CompositeScriptMode scriptMode, string folderPath)
        {
            IEnumerable<string> result = GetStrings("sub", scriptMode.ToString().ToLower(), folderPath);

            return result;
        }