I give MVVMCross a back to see if it will be useful in some large projects, and thatโs great. I like the navigation, viewModel layout and the general cross-platform approach I need. However, I am a bit stuck in sharing some injection dependencies by platform.
So, we have a main application with a common portable library that initializes service links at startup:
public TwitterSearchApp() { InitaliseServices(); } private void InitaliseServices() { this.RegisterServiceInstance<ITwitterSearchProvider>(new TwitterSearchProvider()); }
Fine This defines the service implementations that will be used across all platforms. But what about the situation when I need different implementations on different platforms - for example, memory / caching, where the main requirement is the same, but on the phone it needs to be processed differently than on the tablet.
I thought he could go to Setup somewhere:
public class Setup : MvxBaseWinRTSetup { public Setup(Frame rootFrame): base(rootFrame) { } protected override MvxApplication CreateApp() { var app = new TwitterSearchApp();
but I'm not sure. I saw links to replace the ViewModel locator, but is there a similar way to replace other IoC services?
Thank you, excellent work on the framework as a whole, I really like how it works (except for this bit, which I do not understand yet)
Toby
source share