InternetService.cs 452 B

12345678910111213141516
  1. using Windows.Networking.Connectivity;
  2. using FormulaOneApp.Services.Internet;
  3. using FormulaOneApp.WinPhone.Services.Internet;
  4. using Xamarin.Forms;
  5. [assembly: Dependency(typeof(InternetService))]
  6. namespace FormulaOneApp.WinPhone.Services.Internet
  7. {
  8. public class InternetService : IInternetService
  9. {
  10. public bool HasConnection()
  11. {
  12. return NetworkInformation.GetInternetConnectionProfile() != null;
  13. }
  14. }
  15. }