开发者

Unity 2 - Why has the BuildUp method changed?

开发者 https://www.devze.com 2022-12-31 05:21 出处:网络
开发者_JAVA百科I am starting to use Unity 2 , having happily used earlier versions. I notice that the IUnityContainer.BuildUP(object obj) method has been removed. Why has this happened?It\'s here, tha
开发者_JAVA百科

I am starting to use Unity 2 , having happily used earlier versions. I notice that the IUnityContainer.BuildUP(object obj) method has been removed. Why has this happened?


It's here, that's for shure. It's just moved to extension methods. http://msdn.microsoft.com/en-us/library/microsoft.practices.unity.unitycontainerextensions_members(v=PandP.20).aspx

Perhaps you don't have

using Microsoft.Practices.Unity

In some cases you'll have to add it when migrating from unity 1.2

The following overload is replacement for IUnityContainer.BuildUp(object obj)(actualy BuildUp(T obj)) becouse params ResolverOverride[] resolverOverrides are optional http://msdn.microsoft.com/en-us/library/ff662062(v=PandP.20).aspx, so your code should compile without any changes

0

精彩评论

暂无评论...
验证码 换一张
取 消