tôi có thể tự động đăng ký tất cả các loại mà thực hiện giao diện với tuyên bố nàyphụ thuộc Resolve chỉ từ namespace định
IUnityContainer container = new UnityContainer();
container.RegisterTypes(
AllClasses.FromAssembliesInBasePath(),
WithMappings.FromMatchingInterface,
WithName.Default,
WithLifetime.Transient);
ICustomer result = container.Resolve<ICustomer>();
Làm thế nào tôi có thể xác định một không gian tên cho các giao diện và hiện thực?
tức là: chỉ các giao diện trong Framework.RepositoryInterfaces
mới được giải quyết theo loại trong Framework.RepositoryImplementations
.