Пример #1
0
 private void ContentEvents_DeletingContent(object sender, ContentEventArgs e)
 {
     if (e.Content is SBRobotsTxt)
     {
         Task.Run(async() => await SeoHelper.RemoveRoute());
     }
 }
Пример #2
0
 private void ContentEvents_MovingContent(object sender, ContentEventArgs e)
 {
     if (e.Content is SBRobotsTxt)
     {
         if (e.TargetLink.ID != ContentReference.WasteBasket.ID)
         {
             Task.Run(async() => await SeoHelper.AddRoute());
         }
         else
         {
             Task.Run(async() => await SeoHelper.RemoveRoute());
         }
     }
 }