Cinch v2 and ServiceLocator.Current

Dec 9, 2012 at 9:54 PM

I am having problems using ServiceLocator.Current when my application uses Cinch version 2. Some of my classes are marked with:

[PartCreationPolicy(CreationPolicy.Shared)]

but it doesn't seem to be respected since two instances are created.

The first instance is created when any class has declared the type as [Import], and the second instance is created when calling ServiceLocator.Current.GetInstance<...>().

Does anybody know what is happening?

Dec 10, 2012 at 4:55 PM

It was my own fault. I configured the bootstrapper according to Demo 1 in http://www.codeproject.com/Articles/145175/Showcasing-Cinch-MVVM-framework-Prism-4-interopera, I should have used the bootstrapper in Demo 2.

Coordinator
Dec 20, 2012 at 11:43 AM

Cool, glad you are all fixed