如何在Ninject中编写此StructureMap行
ForRequestedType<HttpContextBase>()
.TheDefault.Is.ConstructedBy(x => new HttpContextWrapper(HttpContext.Current));
答案 0 :(得分:5)
Bind<HttpContextBase>().ToMethod(context => new HttpContextWrapper(HttpContext.Current));