master
 1using System;
 2using System.Windows.Forms;
 3using Notepad.Infrastructure.Core;
 4
 5namespace Notepad.Infrastructure.Container.Windsor {
 6    public interface IComponentExclusionSpecification : ISpecification<Type> {}
 7
 8    public class ComponentExclusionSpecification : IComponentExclusionSpecification {
 9        public bool IsSatisfiedBy(Type type) {
10            return type.GetInterfaces().Length == 0
11                   || type.IsSubclassOf(typeof (Form))
12                   || type.IsAssignableFrom(typeof (IDependencyRegistry));
13        }
14    }
15}