3

I've created a simple PRISM application with a standard bootstrapper inherited from UnityBootstrapper.

The UnityBootstrapper in turn has the public property IUnityContainer and this interface has the following resolve singature:

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

Now, I don't know how to get the other resolve methods which are described here.

Am I confusing Unity with its IUnityContainer interface?

Juergen
  • 3,489
  • 6
  • 35
  • 59

3 Answers3

7

In Unity 1.2, IUnityContainer had all of those overloads available.

In Unity 2.0, you need to bring UnityContainerExtensions in scope because the overloads you want are defined as extension methods on this class.

Jon
  • 428,835
  • 81
  • 738
  • 806
1

IUnityContainer has the following resolve methods:

http://msdn.microsoft.com/en-us/library/microsoft.practices.unity.iunitycontainer.resolve.aspx

jgauffin
  • 99,844
  • 45
  • 235
  • 372
1

These methods are extension methods

Signature:

public static T Resolve<T>(this IUnityContainer container, params ResolverOverride[] overrides);

So if you have implemented IUnityContainer you can use them.

Kirill Polishchuk
  • 54,804
  • 11
  • 122
  • 125