나는 다음과 같은 설정이있는 경우 :성 윈저 자동 등록
public interface IUsersQuery{}
public class UsersQuery : IUsersQuery {}
public interface ICompanyQuery{}
public class CompanyQuery : ICompanyQuery {}
이 가능하여 하나의 일을 한 번에 모든 IABCQuery와 해당 구현 ABCQuery을 대신 등록 자동차에를 하나
container.Regsiter(
Component.For<ICompanyQuery>().ImplementedBy<CompanyQuery>(),
Component.For<IUsersQuery>().ImplementedBy<UsersQuery>()
)
내가 인터페이스에 마커의 일종을 추가하면 나는 어쩌면 생각,
public interface IEnhancedQuery {}
public interface IUsersQuery : IEnhanceQuery {}
public interface ICompanyQuery : IEnhancedQuery {}
내가 할 수 있을지 모르지만, AllTypes를 통해 자동 등록을 등록하는 데 어려움을 겪고 있습니다.
'Container.Register (AllTypes.FromThisAssembly(). BasedOn c.LifeStyle.Is (LifestyleType.Transient)))); 'Then IUsersQuery -> 컨테이너에있는 UserQuery. –
Liao
구체적 유형으로 자동 이름을 지정하는 방법이 있습니까? –