Esempio n. 1
0
        public async Task <RequestConfiguration> GetTypes()
        {
            IpGeographicLocation model = null;
            //On Deploy change this!!!
            //var remoteIpAddress = HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString();
            var RequestLocation = "134.17.27.99";

            if (!string.IsNullOrEmpty(RequestLocation))
            {
                model = await IpGeographicLocation.QueryGeographicalLocationAsync(RequestLocation);
            }
            var code  = IpGeographicLocation.GetQueryPhoneCode(model.CountryName);
            var types = requestTypesService.GetStringTypes();
            RequestConfiguration requestConfiguration = new RequestConfiguration
            {
                Types = types,
                Code  = code
            };

            return(requestConfiguration);
        }