Exemple #1
0
        public ActionResult Index()
        {
            var hostList = GetHostsSelectListItems();
            var model    = new ManifestJsonViewModel()
            {
                SiteList = hostList
            };

            if (hostList.Any())
            {
                model.Data = _manifestJsonService.Get(hostList.First().Value);
            }

            return(View(model));
        }
Exemple #2
0
        public ActionResult Index()
        {
            var hostLookUpArray = _siteDefinitionRepository.List().SelectMany(sd => sd.Hosts, (sd, host) => host.Name).ToArray();
            var siteKey         = _manifestJsonService.GetSiteKey(SiteDefinition.Current.Id, hostLookUpArray.Contains(Request.Url.Host) ? Request.Url.Host : "*");

            return(Content(_manifestJsonService.Get(siteKey), "application/manifest+json"));
        }