예제 #1
0
        private bool TryLookupInternal(out CivicAddress address, out GeoCoordinate coordinates)
        {
            address     = null;
            coordinates = null;
            IPAddress ip;

            return(ExternalIPResolver.GetExternalIPAddress(out ip) && TryLookupInternal(ip, out address, out coordinates));
        }
예제 #2
0
        private async Task <AsyncResult <Tuple <CivicAddress, GeoCoordinate> > > TryLookupInternal()
        {
            var ipResult = await ExternalIPResolver.GetExternalIPAddressAsync().ConfigureAwait(false);

            if (!ipResult.Success)
            {
                return(new AsyncResult <Tuple <CivicAddress, GeoCoordinate> >(false, null));
            }

            return(await TryLookupInternal(ipResult.Result).ConfigureAwait(false));
        }