예제 #1
0
        protected override void OnSleep()
        {
            base.OnSleep();

            AppStateContainer.GetInstance().IsAppActive = false;

            try
            {
                var storage = App.Current.Container.Resolve <Services.Storage.IStorageService>();
                storage?.Suspend();
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Database suspension failed.");
            }
        }
예제 #2
0
 public EquityService(HttpClient _httpClient, AppStateContainer _state)
 {
     httpClient = _httpClient;
     state      = _state;
 }
예제 #3
0
        protected override void OnResume()
        {
            base.OnResume();

            AppStateContainer.GetInstance().IsAppActive = true;
        }
 public CustomAuthStateProvider(HttpClient httpClient, AppStateContainer appStateContainer)
 {
     _httpClient        = httpClient;
     _appStateContainer = appStateContainer;
 }