public static void RecursiveItemSave(Item i, bool reverseDashes)
 {
     foreach (Item a in i.Children)
     {
         ItemNamingHelper.UpdateItemNames(a, reverseDashes);
         RecursiveItemSave(a, reverseDashes);
     }
 }
        protected void OnItemSaving(object sender, EventArgs args)
        {
            //ensures arguments aren't null
            Assert.ArgumentNotNull(sender, "sender");
            Assert.ArgumentNotNull(args, "args");

            //gets item parameter from event arguments
            object obj  = Event.ExtractParameter(args, 0);
            Item   item = obj as Item;

            if (item != null)
            {
                ItemNamingHelper.UpdateItemNames(item);
            }
        }