안녕하세요, Ninject IoC 컨테이너를 사용하고 있습니다. 구조체 코드를 ninject로 변환 할 수 없습니다.구조적 맵과 같은 문맥 적 바인딩
이것은 내가 Ninject에 코드를 사용하고
For<IProductCatalogService>().Use<ProductCatalogService>().Named("realProductCatalogService");
For<IProductCatalogService>().Use<CachedProductCatalogService>()
.Ctor<IProductCatalogService>().Is(p => p.TheInstanceNamed("realProductCatalogService"));
그리고 바인딩 Structuremap 코드는이
Kernel.Bind<IProductCatalogService>().To<ProductCatalogService>().Named("realProductCatalogService");
Kernel.Bind<IProductCatalogService>().To<CachedProductCatalogService>().Named("cachedProductCatalogService");
비슷하지만이 작동하지 않습니다.
참조 http://stackoverflow.com/questions/8447037/how-the-binding-are-done-with-decorators-using-ninject –