Beispiel #1
0
        private async Task <bool> ShouldIPAddressBeUpdated(ILogger logger)
        {
            if (!await NetworkHelpers.IsNetworkConnected())
            {
                logger.LogError("No connection to the internet");
                return(false);
            }

            if (NetworkHelpers.IsVPNOn())
            {
                logger.LogInfo("VPN is on, IP address will not be updated.");
                return(false);
            }
            return(true);
        }