⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clientcssresourceattribute.cs

📁 AJAX 应用 实现页面的无刷新
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace AjaxControlToolkit
{
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1019:DefineAccessorsForAttributeArguments", Justification = "The composition of baseType and resourceName is available as ResourcePath")]
    public sealed class ClientCssResourceAttribute : Attribute
    {
        private string _resourcePath;
        private int _loadOrder;

        public ClientCssResourceAttribute(Type baseType, string resourceName)
        {
            if (baseType == null) throw new ArgumentNullException("baseType");
            if (resourceName == null) throw new ArgumentNullException("resourceName");

            string typeName = baseType.FullName;
            int lastDot = typeName.LastIndexOf('.');
            if (lastDot != -1)
            {
                typeName = typeName.Substring(0, lastDot);
            }
            _resourcePath = typeName + '.' + resourceName;
        }

        public ClientCssResourceAttribute(string fullResourceName)
        {
            if (fullResourceName == null) throw new ArgumentNullException("fullResourceName");
            _resourcePath = fullResourceName;
        }

        public string ResourcePath
        {
            get { return _resourcePath; }
        }

        public int LoadOrder
        {
            get { return _loadOrder; }
            set { _loadOrder = value; }
        }
    }
}

⌨️ 快捷键说明

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