using System;
using Telerik.Sitefinity.Forums.Events;
using Telerik.Sitefinity.Services;

namespace SitefinityWebApp
{
    public class Global : System.Web.HttpApplication
    {
        protected void Application_Start(object sender, EventArgs e)
        {
            SystemManager.ApplicationStart += new EventHandler<EventArgs>(ApplicationStartHandler);
        }

        private void ApplicationStartHandler(object sender, EventArgs e)
        {
            EventHub.Subscribe<IForumUpdatedEvent>(evt => ForumUpdatedEventHandler(evt));
        }

        public void ForumUpdatedEventHandler(IForumUpdatedEvent eventInfo)
        {
            var forumsUserId = eventInfo.UserId;
            var forum = eventInfo.Item;
            var newForumTitle = forum.Title;
        }
    }
}