利用插件整理代码,排序和移除不需要的引用。小心.Net2/.Net4的兼容问题
nnhy authored at 2012-12-08 10:14:21
855.00 B
X_NET20
using System;
using System.ComponentModel;

namespace XControl
{
    [AttributeUsage(AttributeTargets.All)]
    internal sealed class WebCategoryAttribute : CategoryAttribute
    {
        // Methods
        internal WebCategoryAttribute(string category)
            : base(category)
        {
        }

        protected override string GetLocalizedString(string value)
        {
            string localizedString = base.GetLocalizedString(value);
            if (localizedString == null)
            {
                localizedString = SR.GetString("Category_" + value);
            }
            return localizedString;
        }

        // Properties
        public override object TypeId
        {
            get
            {
                return typeof(CategoryAttribute);
            }
        }
    }
}