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?

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

Comments

1

IUnityContainer has the following resolve methods:

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

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.