Пример #1
0
        protected override void OnExit(object sender, EventArgs e)
        {
            this.Log().Info("Starting Espera shutdown");

            this.Log().Info("Shutting down the library");
            Locator.Current.GetService <Library>().Dispose();

            this.Log().Info("Shutting down BlobCaches");
            BlobCache.Shutdown().Wait();
            var requestCache = Locator.Current.GetService <IBlobCache>(BlobCacheKeys.RequestCacheContract);

            requestCache.InvalidateAll().Wait();
            requestCache.Dispose();
            requestCache.Shutdown.Wait();

            this.Log().Info("Shutting down NLog");
            NLog.LogManager.Shutdown();

            if (this.mobileApi != null)
            {
                this.Log().Info("Shutting down mobile API");
                this.mobileApi.Dispose();
            }

            this.Log().Info("Shutting down analytics client");
            AnalyticsClient.Instance.Dispose();

            this.Log().Info("Shutdown finished");
        }
 public void Cleanup_Akavache()
 {
     BlobCache.Secure.InvalidateAll();
     BlobCache.UserAccount.InvalidateAll();
     BlobCache.LocalMachine.InvalidateAll();
     BlobCache.Shutdown().Wait();
 }
Пример #3
0
        protected override async void OnExit(ExitEventArgs e)
        {
            base.OnExit(e);

            AudioPlayer.Instance.Dispose();
            await BlobCache.Shutdown();
        }
Пример #4
0
        public App()
        {
            Directory.CreateDirectory(AppDataFolderPath);

            this.Events().Exit
            .SelectMany(_ => Observable.FromAsync(() => BlobCache.Shutdown()))
            .Subscribe();
        }
Пример #5
0
 protected override void OnSleep()
 {
     BlobCache.Shutdown().Wait();
     MessagingCenter.Unsubscribe <ILoginViewModel, bool>(this, "LoginStatus");
     MessagingCenter.Unsubscribe <ILogoutPage>(this, "LogMeOut");
     MessagingCenter.Unsubscribe <ITermsPage>(this, "mTermsAgreed");
     CrossConnectivity.Current.ConnectivityChanged -= ConnectionError;
     // Handle when your app sleeps
 }
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    cache = null;
                    BlobCache.Shutdown().Wait();
                }

                // TODO: free unmanaged resources (unmanaged objects) and override finalizer
                // TODO: set large fields to null
                disposedValue = true;
            }
        }
Пример #7
0
        protected override void OnDestroy()
        {
            try
            {
                this.disposer?.Dispose();
                this.disposer = null;

                //卸载广播
                UnregisterReceiver(screenStateReceiver);

                //BlobCache.Shutdown()方法对 Akavache 缓存的完整性至关重要。
                //当您的应用程序关闭时,您必须调用它。而且,一定要等待结果:
                //不这样做可能意味着排队的项目不会刷新到缓存中。
                BlobCache.Shutdown().Wait();
            }
            catch (System.Exception) { }
            finally
            {
                base.OnDestroy();
            }
        }
Пример #8
0
 protected override void OnSleep()
 {
     BlobCache.Shutdown().Wait();
 }
Пример #9
0
 protected override void OnDestroy()
 {
     BlobCache.Shutdown().Wait();
     base.OnDestroy();
 }
Пример #10
0
 private void CleanUp()
 {
     BlobCache.Shutdown().Wait();
     this.mutex.ReleaseMutex();
     this.mutex.Dispose();
 }
Пример #11
0
 protected override void OnSleep()
 {
     // Handle when your app sleeps
     BlobCache.Shutdown().Wait();
 }
Пример #12
0
 public override void WillTerminate(UIApplication application)
 {
     // Called when the application is about to terminate. Save data, if needed. See also DidEnterBackground.
     BlobCache.Shutdown().Wait();
 }
Пример #13
0
 public async Task Shutdown()
 {
     await BlobCache.Shutdown();
 }
Пример #14
0
 public static void Shutdown() => BlobCache.Shutdown().Wait();
Пример #15
0
 public override void WillTerminate(UIApplication application)
 {
     BlobCache.Shutdown().Wait();
 }
 private void _timer_Tick(object sender, EventArgs e)
 {
     _count++;
     BlobCache.Shutdown().Wait();
     RestartApplication();
 }
Пример #17
0
 private void ApplicationExit(object sender, ExitEventArgs e)
 {
     BlobCache.Shutdown().Wait();
 }
Пример #18
0
 public void Shutdown()
 {
     BlobCache.Shutdown().Wait();
 }
 protected override void OnExit(ExitEventArgs e)
 {
     base.OnExit(e);
     BlobCache.Shutdown().Wait();
 }
Пример #20
0
 protected override void OnExiting(object sender, EventArgs args)
 {
     level?.SaveGame();
     BlobCache.Shutdown().Wait();
     base.OnExiting(sender, args);
 }
 public override void OnTerminate()
 {
     base.OnTerminate();
     BlobCache.Shutdown().Wait();
 }
Пример #22
0
 public override void WillTerminate(UIApplication uiApplication)
 {
     BlobCache.Shutdown();
     base.WillTerminate(uiApplication);
 }
Пример #23
0
 public static async Task ShutdownAsync()
 {
     await BlobCache.Shutdown();
 }