AddingFiltersWithoutSupertype.MvcApplication.Application_Start C# (CSharp) Method

Application_Start() protected method

protected Application_Start ( ) : void
return void
        protected void Application_Start()
        {
            ObjectFactory.Initialize(x =>
                                     x.Scan(a =>
                                                {
                                                    a.TheCallingAssembly();
                                                    a.WithDefaultConventions();
                                                    a.AddAllTypesOf<IAutoActionFilter>();
                                                }));

            RegisterRoutes(RouteTable.Routes);
            ControllerFactory.GetInstance = type => ObjectFactory.GetInstance(type);

            ControllerBuilder.Current.SetControllerFactory(new ControllerFactory());
        }