示例#1
0
文件: MCS.cs 项目: tetex7/x46FW_CS
        public static ulong gID <T>() where T : class
        {
            Type R = typeof(T);

            System.Attribute[] attrs = System.Attribute.GetCustomAttributes(R);
            foreach (System.Attribute attr in attrs)
            {
                if (attr is MISexAttribute)
                {
                    MISexAttribute a = (MISexAttribute)attr;
                    return(a.m_ID);
                }
            }
            return(0);
        }
示例#2
0
文件: MCS.cs 项目: tetex7/x46FW_CS
        public static bool ISC <T>() where T : class
        {
            Type R = typeof(T);

            System.Attribute[] attrs = System.Attribute.GetCustomAttributes(R);
            foreach (System.Attribute attr in attrs)
            {
                if (attr is MISexAttribute)
                {
                    MISexAttribute a = (MISexAttribute)attr;
                    return(a.m_icore);
                }
            }
            return(false);
        }
示例#3
0
文件: MCS.cs 项目: tetex7/x46FW_CS
        public static string gNAME <T>() where T : class
        {
            Type R = typeof(T);

            System.Attribute[] attrs = System.Attribute.GetCustomAttributes(R);
            foreach (System.Attribute attr in attrs)
            {
                if (attr is MISexAttribute)
                {
                    MISexAttribute a = (MISexAttribute)attr;
                    return(a.m_name);
                }
            }
            return("404");
        }
示例#4
0
文件: MCS.cs 项目: tetex7/x46FW_CS
        public static MISexAttribute fMOD <T>() where T : class
        {
            Type R = typeof(T);

            System.Attribute[] attrs = System.Attribute.GetCustomAttributes(R);
            foreach (System.Attribute attr in attrs)
            {
                if (attr is MISexAttribute)
                {
                    MISexAttribute a = (MISexAttribute)attr;
                    return(a);
                }
                else
                {
                    throw new x46_FW.MIS.EXC.ModuleNotFoundException("x");
                }
            }
            return(null);
        }