public void EnsureInitialized(Context applicationContext) { if (MvxSimpleIoCContainer.Instance != null) return; var ioc = MvxSimpleIoCContainer.Initialise(); ioc.RegisterSingleton<IMvxTrace>(new MvxDebugOnlyTrace()); ioc.RegisterSingleton<IMvxPluginManager>(new MvxFileBasedPluginManager("Droid")); ioc.RegisterSingleton<IMvxAndroidGlobals>(new AndroidGlobals(applicationContext)); var topActivity = new AndroidTopActivity(); ioc.RegisterSingleton<ITopActivity>(topActivity); ioc.RegisterSingleton<IMvxAndroidCurrentTopActivity>(topActivity); ioc.RegisterSingleton<IMvxMainThreadDispatcherProvider>(topActivity); var builder = new MvxDroidBindingBuilder(ignored => { }, ignored => { }, ignored => { }); builder.DoRegistration(); }
public void EnsureInitialized(Context applicationContext) { if (MvxSimpleIoCContainer.Instance != null) { return; } var ioc = MvxSimpleIoCContainer.Initialise(); ioc.RegisterSingleton <IMvxTrace>(new MvxDebugOnlyTrace()); ioc.RegisterSingleton <IMvxPluginManager>(new MvxFilePluginManager(".Droid", ".dll")); ioc.RegisterSingleton <IMvxAndroidGlobals>(new AndroidGlobals(applicationContext)); var topActivity = new AndroidTopActivity(); ioc.RegisterSingleton <ITopActivity>(topActivity); ioc.RegisterSingleton <IMvxAndroidCurrentTopActivity>(topActivity); ioc.RegisterSingleton <IMvxMainThreadDispatcher>(topActivity); var builder = new MvxAndroidBindingBuilder(ignored => { }, ignored => { }, ignored => { }); builder.DoRegistration(); }