private void Init(string name, Assembly asm, bool register_enumdesc) { _resourceName = name; _asm = asm; LoadResourceManager(); if (register_enumdesc) { EnumDescAttribute.AddResourceTable(asm, this); } }
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); }