/// <summary> /// Read the custom redirects from the dynamic data store, and /// stores them in the CustomRedirect property /// </summary> protected void LoadCustomRedirects() { _customRedirects = new CustomRedirectCollection(); foreach (var redirect in RedirectsService.GetAll()) { _customRedirects.Add(redirect); } }
/// <summary> /// Read the custom redirects from the dynamic data store, and /// stores them in the CustomRedirect property /// </summary> protected void LoadCustomRedirects() { _customRedirects = new CustomRedirectCollection(); foreach (var redirect in RedirectsService.GetAll()) { try { _customRedirects.Add(redirect); } catch (Exception ex) { Logger.Error(string.Format("An error occurred while loading redirect OldUrl = {0}", redirect.OldUrl), ex); CustomRedirectHandlerException = ex.ToString(); } } }
public List <CustomRedirect> GetCustomRedirects(bool excludeIgnored) { return(excludeIgnored ? _redirectsService.GetSaved().ToList() : _redirectsService.GetAll().ToList()); }