Exemplo n.º 1
0
 private void Init(string name, Assembly asm, bool register_enumdesc)
 {
     _resourceName = name;
     _asm          = asm;
     LoadResourceManager();
     if (register_enumdesc)
     {
         EnumDescAttribute.AddResourceTable(asm, this);
     }
 }
Exemplo n.º 2
0
        public static EnumDescAttribute For(Type type)
        {
            EnumDescAttribute a = _typeToAttr[type] as EnumDescAttribute;

            if (a == null)
            {
                a = (EnumDescAttribute)(type.GetCustomAttributes(typeof(EnumDescAttribute), false)[0]);
                _typeToAttr.Add(type, a);
            }
            return(a);
        }