public virtual void RemoveSplashScreen(IMvxAndroidSplashScreenActivity splashScreen) { lock (LockObject) { _currentSplashScreen = null; } }
public virtual void InitializeFromSplashScreen(IMvxAndroidSplashScreenActivity splashScreen) { lock (LockObject) { _currentSplashScreen = splashScreen; if (_initializationStarted) { if (_initialized) { _currentSplashScreen.InitializationComplete(); return; } return; } _initializationStarted = true; } _setup.InitializePrimary(); ThreadPool.QueueUserWorkItem(ignored => { _setup.InitializeSecondary(); lock (LockObject) { _initialized = true; if (_currentSplashScreen != null) { _currentSplashScreen.InitializationComplete(); } } }); }
protected override void Dispose(bool isDisposing) { if (isDisposing) { lock (LockObject) { _currentSplashScreen = null; } } base.Dispose(isDisposing); }
public virtual void InitializeFromSplashScreen(IMvxAndroidSplashScreenActivity splashScreen) { lock (LockObject) { _currentSplashScreen = splashScreen; if (_initialized) { _currentSplashScreen?.InitializationComplete(); return; } if (IsInitialisedTaskCompletionSource != null) { return; } else { IsInitialisedTaskCompletionSource = new TaskCompletionSource <bool>(); _setup.InitializePrimary(); ThreadPool.QueueUserWorkItem(ignored => { _setup.InitializeSecondary(); lock (LockObject) { IsInitialisedTaskCompletionSource.SetResult(true); _initialized = true; var dispatcher = Mvx.GetSingleton <IMvxMainThreadDispatcher>(); dispatcher.RequestMainThreadAction(() => { _currentSplashScreen?.InitializationComplete(); }); } }); } } }