private bool ValidateAddress(ILocationAddress newAddress)
        {
            if (newAddress == null)
            {
                ShowError(Resource.String.EmptyLocationAddressError);
                return(false);
            }

            if (string.IsNullOrEmpty(newAddress.Locality))
            {
                ShowError(Resource.String.LocalityIsNullLocationAddressError);
                return(false);
            }

            if (_settings.IsNotAppWidget)
            {
                var locations = AppSettings.Default.GetLocations();
                if (locations != null && locations.Any(p => p.Value != null && p.Value.Equals(newAddress)))
                {
                    ShowError(Resource.String.ExstsLocationAddressError);
                    return(false);
                }
            }

            return(true);
        }
 public virtual WeatherForecast GetForecast(ILocationAddress location, OptionalParameters optionalParameters, CancellationToken?token)
 {
     Initialize(optionalParameters);
     return(ForecastHandler?.Invoke(this, location, optionalParameters, token));
 }