Ejemplo n.º 1
0
        private void ProcessPano(Pano pano, PanoModel panoModel, string objectDir)
        {
            HttpResponseMessage result;
            string soortAanbod = panoModel.SoortAanbod;

            using (HttpClient client = new HttpClient())
            {
                result = client.GetAsync($"http://partnerapi.funda.nl/feeds/MijnFunda.svc/GetKrpanoXmlContent/?type={soortAanbod}&globalId={panoModel.GlobalId}&mediaGuid={pano.Id}").Result;
            }

            if (result.IsSuccessStatusCode)
            {
                var xml    = result.Content.ReadAsStringAsync().Result;
                var xdoc   = XDocument.Parse(Sanitize(xml));
                var images = xdoc.Root.Descendants("tablet").Descendants();
                xmlService.AddScene(pano, GetHotspots(xdoc, panoModel), images.First().FirstAttribute.Value);
            }
            else
            {
                Console.WriteLine(result.ReasonPhrase);
            }
        }