In question Using MvvmCross from content and action providers I wanted to know how to initialize the MvvmCross system.
Then the answer turned out to be processed, but with recent updates to MvvmCross, the function I used (MvxAndroidSetupSingleton.GetOrCreateSetup ()) is deprecated.
Now I changed my initialization and it seems to be working so far, but is it right and right? Should I do something different to improve portability?
DLL installation class for the Android platform:
public class Setup : MvxAndroidSetup { public Setup(Context applicationContext) : base(applicationContext) { } protected override IMvxApplication CreateApp() {
And my App class in the portable core library:
public class App : MvxApplication { public App() { } public override void Initialize() { base.Initialize(); AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionHandler; InitialisePlugins(); InitaliseServices(); InitialiseStartNavigation(); } private void InitaliseServices() { CreatableTypes().EndingWith("Service").AsInterfaces().RegisterAsLazySingleton(); } private void InitialiseStartNavigation() { } private void InitialisePlugins() {
source share