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")); }
private List <SelectListItem> GetHostsSelectListItems() { return(_siteDefinitionRepository.List().SelectMany(d => d.Hosts, (s, h) => new SelectListItem { Value = _manifestJsonService.GetSiteKey(s.Id, h.Name), Text = $"{s.Name} > {h.Name}" }).ToList()); }