Exemplo n.º 1
0
        public static void Load()
        {
            var assemblies = ObjectContainer.GetAssemblies();

            foreach (var assembly in assemblies)
            {
                var filterClasses = assembly.DefinedTypes.Where(i => typeof(IFilter).GetTypeInfo().IsAssignableFrom(i) && i.IsClass && !i.IsAbstract).Select(i => i.AsType());
                Filters.AddRange(filterClasses.Select(i => (IFilter)Activator.CreateInstance(i)));
            }
        }