castle windsor学习----- CastleComponentAttribute 特性注册
[CastleComponent("GenericRepository", typeof(IRepository<>), Lifestyle = LifestyleType.Transient)] public class Repository<T> : IRepository, IRepository<T> { // some implementation }
container.Register(AllTypes.FromThisAssembly()
.Pick()
.If(Component.IsCastleComponent));