Example #1
0
        protected override void InitializePlatformServices()
        {
            this.InitializeLifetimeMonitor();

            Mvx.RegisterSingleton <IMvxAndroidGlobals>(this);

            var intentResultRouter = new MvxIntentResultSink();

            Mvx.RegisterSingleton <IMvxIntentResultSink>(intentResultRouter);
            Mvx.RegisterSingleton <IMvxIntentResultSource>(intentResultRouter);

            var viewModelTemporaryCache = new MvxSingleViewModelCache();

            Mvx.RegisterSingleton <IMvxSingleViewModelCache>(viewModelTemporaryCache);

            var viewModelMultiTemporaryCache = new MvxMultipleViewModelCache();

            Mvx.RegisterSingleton <IMvxMultipleViewModelCache>(viewModelMultiTemporaryCache);
        }
Example #2
0
        protected override void InitializeFirstChance()
        {
            InitializeLifetimeMonitor();
            InitializeAndroidCurrentTopActivity();
            RegisterPresenter();

            Mvx.IoCProvider.RegisterSingleton <IMvxAndroidGlobals>(this);

            var intentResultRouter = new MvxIntentResultSink();

            Mvx.IoCProvider.RegisterSingleton <IMvxIntentResultSink>(intentResultRouter);
            Mvx.IoCProvider.RegisterSingleton <IMvxIntentResultSource>(intentResultRouter);

            var viewModelTemporaryCache = new MvxSingleViewModelCache();

            Mvx.IoCProvider.RegisterSingleton <IMvxSingleViewModelCache>(viewModelTemporaryCache);

            var viewModelMultiTemporaryCache = new MvxMultipleViewModelCache();

            Mvx.IoCProvider.RegisterSingleton <IMvxMultipleViewModelCache>(viewModelMultiTemporaryCache);
            base.InitializeFirstChance();
        }
Example #3
0
        protected override void InitializePlatformServices()
        {
            var lifetimeMonitor = new MvxAndroidLifetimeMonitor();

            Mvx.RegisterSingleton <IMvxAndroidActivityLifetimeListener>(lifetimeMonitor);
            Mvx.RegisterSingleton <IMvxAndroidCurrentTopActivity>(lifetimeMonitor);
            Mvx.RegisterSingleton <IMvxLifetime>(lifetimeMonitor);

            Mvx.RegisterSingleton <IMvxAndroidGlobals>(this);

            var intentResultRouter = new MvxIntentResultSink();

            Mvx.RegisterSingleton <IMvxIntentResultSink>(intentResultRouter);
            Mvx.RegisterSingleton <IMvxIntentResultSource>(intentResultRouter);

            var viewModelTemporaryCache = new MvxSingleViewModelCache();

            Mvx.RegisterSingleton <IMvxSingleViewModelCache>(viewModelTemporaryCache);

            InitializeNavigationSerializer();
            InitializeSavedStateConverter();
        }