摘要:
public class HomeController : Controller { public ActionResult Index() { //核心对象 IKernel ninjectKernel = new StandardKernel(); ninjectKernel.Bind().To(); //方案1:获取接口实例 IValueCaculator calImpl = ninjectKernel.Get(); ... 阅读全文
posted @ 2013-08-27 14:29
瓜王
阅读(275)
评论(0)
推荐(0)
摘要:
根据effective c#一书,作者建议一般可以放在初始化器中,除非1)初始化为null或02)有若干个构造函数3)需要异常捕获 阅读全文
posted @ 2013-08-27 09:44
瓜王
阅读(501)
评论(0)
推荐(0)

浙公网安备 33010602011771号