示例#1
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"));
        }
示例#2
0
 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());
 }