Skip to content

Instantly share code, notes, and snippets.

@jonathanread
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanread/0ef6b96396de81dd996a to your computer and use it in GitHub Desktop.
Save jonathanread/0ef6b96396de81dd996a to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Web.Routing;
using System.Web.Http;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.Data;
using System.Web.Http.OData.Builder;
using Aptera.Sitefinity.Models;
using Telerik.Sitefinity.Lifecycle;
using Telerik.Sitefinity.Modules.Libraries;
using Telerik.Microsoft.Practices.Unity;
using Aptera.Sitefinity.Decorators;
using Telerik.Sitefinity.GenericContent.Model;
namespace SitefinityWebApp
{
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
Bootstrapper.Initialized += new EventHandler<ExecutedEventArgs>(Bootstrapper_Initialized);
}
protected void Bootstrapper_Initialized(object sender, ExecutedEventArgs e)
{
if (e.CommandName == "Bootstrapped")
{
ObjectFactory.Container.RegisterType<ILifecycleDecorator, DocumentsDecorator>
(typeof(LibrariesManager).FullName,
new InjectionConstructor(
new InjectionParameter<ILifecycleManager>(null),
new InjectionParameter<Action<Content, Content>>(null),
new InjectionParameter<Type[]>(null))
);
}
}
protected void Session_Start(object sender, EventArgs e)
{
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
protected void Application_Error(object sender, EventArgs e)
{
}
protected void Session_End(object sender, EventArgs e)
{
}
protected void Application_End(object sender, EventArgs e)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment