2

When I look at version 3.0 of IUnityContainer it only has:

object Resolve(Type t, string name, params ResolverOverride[] resolverOverrides);

Where do I find the generic version so I can do:

container.Reslove < IDoStuff>()

Latest version on nuget hasn't got it or what am I missing?

4

1 回答 1

3

IUnityContainer.Resolve<T>() is an extension method. Add

using Microsoft.Practices.Unity;

to the source file where you want to call Resolve<T>()

于 2013-10-31T14:01:34.147 回答