Beispiel #1
0
        protected override void InitializePlatformServices()
        {
            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);
        }
Beispiel #2
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();
        }