public ConnectivityHelper(IMessagingService messagingService, IThreadExecutionProvider threadExecutionProvider, INetworkStatusService networkStatusService) { _messagingService = messagingService; _threadExecutionProvider = threadExecutionProvider; _networkStatusService = networkStatusService; _isConnected = CrossConnectivity.Current.IsConnected; CrossConnectivity.Current.ConnectivityChanged += OnConnectivityChanged; _networkStatusService.NetworkStatusChanged += NetworkStatusService_NetworkStatusChanged; }