什么是Unity(应用程序块)解析?

时间:2015-12-23 23:47:54

标签: c# dependency-injection unity-container log4net

我想做这样的事情:

        container.RegisterType<ILog>(new InjectionFactory(
            ctr =>
            {
                return LogManager.GetLogger( "HOW CAN I PASS WHAT UNITY IS RESOLVING HERE?");
            }));

当出现统一分辨率错误时,通常会提示Unity在失败时解析哪个对象。如何在正常情况下进入该环境?

0 个答案:

没有答案