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); }); }