Beispiel #1
0
 public void CleanUnwantedLocalItems()
 {
     foreach (Guid id in _allowedItems)
     {
         try
         {
             _sitecore.RecycleItem(id);
             var data = _sitecore.GetItemData(id);
             _logger.BeginEvent(data, "Recycle", _sitecore.GetItemIconSrc(data), false);
         }
         catch (Exception e)
         {
             _logger.BeginEvent(new ErrorItemData()
             {
                 Name = id.ToString("B"), Path = e.ToString()
             }, "Error", "", false);
         }
     }
 }