Exemplo n.º 1
0
        /// <summary>
        /// 初始化mTypeData数据
        /// </summary>
        private static void InitType()
        {
            var types = ReflectionTool.GetTypeListOfAttribute(Assembly.GetAssembly(typeof(NoThing)), typeof(DataBaseTableAttribute));

            //初始化要生成语句的类型数据
            foreach (var type in types)
            {
                if (type.GetCustomAttribute(typeof(DataBaseTableAttribute), false) is DataBaseTableAttribute dataBaseTableAttribute)
                {
                    mTypeData[dataBaseTableAttribute.Name] = type;
                }
            }
        }