Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NetworkStatusViewModel"/> class.
 /// </summary>
 /// <param name="backgroundTaskFacade">The background task facade.</param>
 public NetworkStatusViewModel(NetworkBackgroundTaskFacade backgroundTaskFacade)
 {
     _backgroundTaskFacade = backgroundTaskFacade;
     NetworkInformation.NetworkStatusChanged += onNetworkStatusChanged;
     updatePageInformation();
     checkIfBackgroundTaskRegistered(backgroundTaskFacade);
 }
Ejemplo n.º 2
0
        private void checkIfBackgroundTaskRegistered(NetworkBackgroundTaskFacade backgroundTaskFacade)
        {
            BackgroundTaskRegistration taskRegistration;

            _isRegisteredInBackground = backgroundTaskFacade.IsTaskRegistered(out taskRegistration);
        }