Пример #1
0
        public static void ResetContext()
        {
            MvxSingleton.ClearAllSingletons();
            var ioc = MvxSimpleIoCContainer.Initialize(null);

            ioc.RegisterSingleton(ioc);
            ioc.RegisterSingleton <IMvxTrace>(new UnitTestTrace());
            MvxSingletonCache.Initialize();
            ioc.RegisterSingleton <IMvxSettings>(new MvxSettings());
            MvxTrace.Initialize();
        }
        public void InitializeSingletonCache()
        {
            if (MvxSingletonCache.Instance == null)
            {
                MvxSingletonCache.Initialize();
            }

            if (MvxBindingSingletonCache.Instance == null)
            {
                MvxBindingSingletonCache.Initialize();
            }
        }
Пример #3
0
        static BaseMvvmCrossTest()
        {
            if (MvxSimpleIoCContainer.Instance == null)
            {
                MvxSingletonCache.Initialize();
                MvxSimpleIoCContainer.Initialize();

                MvxSimpleIoCContainer.Instance.RegisterSingleton(MvxSimpleIoCContainer.Instance);
                MvxSimpleIoCContainer.Instance.RegisterSingleton <IMvxTrace>(new TestTrace());
                MvxSimpleIoCContainer.Instance.RegisterSingleton <IMvxSettings>(new MvxSettings());

                MvxTrace.Initialize();
            }
        }
Пример #4
0
        static BaseMvvmCrossTests()
        {
            if (MvxSingleton <IMvxIoCProvider> .Instance != null)
            {
                return;
            }

            MvxSingletonCache.Initialize();
            MvxSimpleIoCContainer.Initialize();

            MvxSingleton <IMvxIoCProvider> .Instance.RegisterSingleton <IMvxTrace>(new TestTrace());

            MvxSingleton <IMvxIoCProvider> .Instance.RegisterSingleton <IMvxSettings>(new MvxSettings());

            MvxTrace.Initialize();
        }
Пример #5
0
 private static void InitializeSingletonCache()
 {
     MvxSingletonCache.Initialize();
 }
Пример #6
0
 protected virtual void InitializeSingletonCache()
 {
     MvxSingletonCache.Initialize();
 }