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