[CastleComponent("GenericRepository", typeof(IRepository<>), Lifestyle = LifestyleType.Transient)] public class Repository<T> : IRepository, IRepository<T> { // some implementation }
container.Register(AllTypes.FromThisAssembly() .Pick() .If(Component.IsCastleComponent));
时间: 2024-10-17 19:40:12