아마도 간단한 질문이지만 설명서 나 SO에서 직접 찾지 못했습니다. 나는 처음으로 Ninject When(Func<IRequest, bool> condition) 확장 메서드로 작업해야했고 null 개체 예외가있는 상태로 조금만 끊었습니다. IRequest.Target 속성이 때때로 null 인 것을 알아 냈습니다. otherexamples 을 사용하면 n
나는 인터페이스가 있습니다 public interface IInterface
{
string Get(obj o);
}
을하고 나는이 개 수업이 있습니다 public class C1 : IInterface
{
string Get(obj o);
}
public class C2 : IInterface
{
string Get(obj o);
컨텍스트 바인딩을 시도하지만 생성자 인수로 구체적인 구현 인터페이스를 바인딩 할 수 없습니다. Ninject에 버전은 다음 3.2.0.0 내 구조이므로 : INotifier에게 1. 2. XNotifier YNotifier IPublisher을 1. 2. APublisher BPublisher XNotifier로서 YNotifier는 IPublisher 유
1) Autofac과 Ninject (문맥 적 바인딩이 더 낫습니까?) 2) Ninject에로, 나는 특정 네임 스페이스의 유형에 바인딩 할 수 있습니다 Bind<A>().To<B>().When(context =>
context.ParentContext.Binding.Service.Namespace == "MyProject.Common");
난