scriptcombineattribute.cs

来自「AJAX 应用 实现页面的无刷新」· CS 代码 · 共 48 行

CS
48
字号
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


using System;

namespace AjaxControlToolkit
{
    /// <summary>
    /// Attribute used to indicate which scripts of an assembly can be combined by ToolkitScriptManager
    /// </summary>
    /// <remarks>
    /// When this attribute is present, all assembly scripts are combinable by default -
    /// use the ExcludeScripts/IncludeScripts properties to restrict that behavior
    /// </remarks>
    [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = true)]
    public sealed class ScriptCombineAttribute : Attribute
    {
        /// <summary>
        /// Comma-delimited list of script names to exclude from script combining
        /// </summary>
        /// <remarks>
        /// Overrides IncludeScripts
        /// </remarks>
        public string ExcludeScripts
        {
            get { return _excludeScripts; }
            set { _excludeScripts = value; }
        }
        private string _excludeScripts;

        /// <summary>
        /// Comma-delimited list of script names to include for script combining
        /// </summary>
        /// <remarks>
        /// If absent, all script names are included; if present, only the specified scripts are included
        /// </remarks>
        public string IncludeScripts
        {
            get { return _includeScripts; }
            set { _includeScripts = value; }
        }
        private string _includeScripts;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?