Esempio n. 1
0
 private void Refresh()
 {
     try {
         var aliases = _storage.List();
         _aliasHolder.SetAliases(aliases.Select(alias => new AliasInfo {
             Path = alias.Item1, Area = alias.Item2, RouteValues = alias.Item3
         }));
     }
     catch (Exception ex) {
         Logger.Error(ex, "Exception during Alias refresh");
     }
 }
Esempio n. 2
0
        public void Refresh()
        {
            try {
                // only retreive aliases which have not been processed yet
                var aliases = _storage.List(x => x.Id > _cursor.Cursor).ToArray();

                // update the last processed id
                if (aliases.Any())
                {
                    _cursor.Cursor = aliases.Last().Item5;
                    _aliasHolder.SetAliases(aliases.Select(alias => new AliasInfo {
                        Path = alias.Item1, Area = alias.Item2, RouteValues = alias.Item3, IsManaged = alias.Item6
                    }));
                }
            }
            catch (Exception ex) {
                Logger.Error(ex, "Exception during Alias refresh");
            }
        }
 private int GetHomePageAliasRecordId()
 {
     return(_aliasStorage.List(x => x.Path == "").First().Item5);
 }