public void Register(AssembliesRegistration assembliesRegistration, int lifeType) { int count = assembliesRegistration.Assemblies.Length; int filtersCount = assembliesRegistration.Filters.Count; for (int index = 0; index < count; index++) { Assembly assembly = assembliesRegistration.Assemblies[index]; IEnumerable<Type> types = assembly.GetTypes(); Func<Type, bool> action = type => type.IsClass && !type.IsAbstract; for (int filterIndex = 0; filterIndex < filtersCount; filterIndex++) { action += assembliesRegistration.Filters[filterIndex]; } types = types.Where(action); Register(types.ToList(), lifeType); } }
public IAssembliesRegistration Register(params Assembly[] assemblies) { var assembliesRegistration = new AssembliesRegistration(this, assemblies); return assembliesRegistration; }