AspNetWebApi.DependencyResolution.Windsor.Global.Application_Start C# (CSharp) Метод

Application_Start() защищенный Метод

protected Application_Start ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void
        protected void Application_Start(object sender, EventArgs e)
        {
            GlobalConfiguration.Configuration.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
              );


            var container = new WindsorContainer();
            container.Register(
                Component.For<ITaxCalculator>()
                .ImplementedBy<TaxCalculator>()
                .LifeStyle.Transient,
                Component.For<ValuesController>()
                .ImplementedBy<ValuesController>()
                .LifeStyle.Transient);

            GlobalConfiguration.Configuration.DependencyResolver = new WindsorDependencyResolver(container);


            // in order to see performance counters, uncomment lines below
            // var counter = LifecycledComponentsReleasePolicy.GetTrackedComponentsPerformanceCounter(new PerformanceMetricsFactory());
            //var diagnostic = LifecycledComponentsReleasePolicy.GetTrackedComponentsDiagnostic(container.Kernel);
            // container.Kernel.ReleasePolicy = new LifecycledComponentsReleasePolicy(diagnostic, counter);

        }