コード例 #1
0
        // GET: IpGeoLocation
        public async Task <ActionResult> Test()
        {
            IpGeoLocation response = await _service.VerifyIpTest();

            IpGeoLocationViewModel model = new IpGeoLocationViewModel
            {
                AutonomousSystemName = response.IpGeoLocationData.As.Name,
                IsBadIp         = false, //TODO: DOUBLE CHECK THIS
                City            = response.IpGeoLocationData.City,
                Continent       = response.IpGeoLocationData.Continent,
                Country         = response.IpGeoLocationData.Country,
                Latitude        = response.IpGeoLocationData.Latitude,
                Longitude       = response.IpGeoLocationData.Longitude,
                PostalCode      = response.IpGeoLocationData.Postal,
                Region          = response.IpGeoLocationData.Region,
                ReverseHostName = response.IpGeoLocationData.Hostname,
                TimeZone        = response.IpGeoLocationData.Time_Zone
            };

            return(View(model));
        }
コード例 #2
0
        // GET: IpGeoLocation
        public ActionResult Index()
        {
            IpGeoLocationViewModel model = new IpGeoLocationViewModel();

            return(View(model));
        }