コード例 #1
0
ファイル: DataRegister.cs プロジェクト: doriswang/Test
        public static void Initialize()
        {
            var type = typeof(IDataModel);

            var currentAssemblyTypes = AppDomain.CurrentDomain.GetAssemblies()
                                       .ToList()
                                       .SelectMany(s => s.GetTypes())
                                       .Where(p => type.IsAssignableFrom(p) && p.IsClass && !p.IsAbstract).ToList();

            currentAssemblyTypes.ForEach(t =>
            {
                PropertyCache.Register(t);
            });
        }