Exemple #1
0
        public void OnApplicationRequestExecuting()
        {
            TaskArgument <TContext> taskArg = new TaskArgument <TContext>(this.Context, this.Type);

            AssemblyHelper.ExecuteTasks <IApplicationRequestExecutingTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg);
            //AssemblyHelper.ExecuteTasks<IApplicationRequestExecutingTask, HttpContext>(httpContext);
        }
        public virtual void OnApplicationStarted()
        {
            TaskArgument <TContext> taskArg = new TaskArgument <TContext>(this.Context, this.Type);

            AssemblyHelper.ExecuteTasks <IApplicationStartedTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg, true);
            AssemblyHelper.ExecuteTasks <IApplicationReadyTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg, true);
        }
Exemple #3
0
        public void OnUnHandledError()
        {
            TaskArgument <TContext> taskArg = new TaskArgument <TContext>(this.Context, this.Type);

            AssemblyHelper.ExecuteTasks <IUnHandledErrorTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg);
            //AssemblyHelper.ExecuteTasks<IUnHandledErrorTask, HttpContext>(httpContext);
        }
Exemple #4
0
        public void OnRouteConfigured()
        {
            //AssemblyHelper.ExecuteTasks<IRouteConfiguredTask, RouteCollection>(RouteTable.Routes);
            TaskArgument <RouteCollection> taskArg = new TaskArgument <RouteCollection>(RouteTable.Routes, this.Type);

            AssemblyHelper.ExecuteTasks <IRouteConfiguredTask, TaskArgument <RouteCollection> >(taskArg);
        }
Exemple #5
0
        /// <summary>
        /// this method must call after App.Common.Application.OnApplicationStarted(HttpContext.Current) called
        /// </summary>
        /// <param name="servicesContainer"></param>
        public void ConfigServiceContainer()
        {
            TaskArgument <ServicesContainer> taskArg = new TaskArgument <ServicesContainer>(GlobalConfiguration.Configuration.Services, this.Type);

            AssemblyHelper.ExecuteTasks <IServiceContainerConfiguredTask <TaskArgument <ServicesContainer> >, TaskArgument <ServicesContainer> >(taskArg);

            //AssemblyHelper.ExecuteTasks<IServiceContainerConfiguredTask, System.Web.Http.Controllers.ServicesContainer>(servicesContainer);
        }
Exemple #6
0
        public override void Execute(TaskArgument <System.Web.HttpApplication> taskArg)
        {
            IWindsorContainer windsorContainer = new WindsorContainer();

            this.RegisterInjector(windsorContainer);
            this.RegisterControllerFactory(windsorContainer);

            IBaseContainer baseContainer = new CastleContainer(windsorContainer);

            IoC.CreateInstance(baseContainer);

            AssemblyHelper.ExecuteTasks <IBootstrapper, IBaseContainer>(IoC.Container);
        }
        public virtual void OnUnHandledError()
        {
            TaskArgument <TContext> taskArg = new TaskArgument <TContext>(this.Context, this.Type);

            AssemblyHelper.ExecuteTasks <IUnHandledErrorTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg, true);
        }
 private void OnRouteConfigured()
 {
     TaskArgument<RouteCollection> taskArg = new TaskArgument<RouteCollection>(RouteTable.Routes, this.Type);
     AssemblyHelper.ExecuteTasks<IRouteConfiguredTask, TaskArgument<RouteCollection>>(taskArg, runTasksInOrder: true);
 }
Exemple #9
0
        public virtual void Config <IApp>(IApp app)
        {
            TaskArgument <IApp> taskArg = new TaskArgument <IApp>(app, this.Type);

            AssemblyHelper.ExecuteTasks <IConfigAppTask <TaskArgument <IApp> >, TaskArgument <IApp> >(taskArg, true);
        }
Exemple #10
0
        public void OnApplicationInitialized()
        {
            TaskArgument <TContext> taskArg = new TaskArgument <TContext>(this.Context, this.Type);

            AssemblyHelper.ExecuteTasks <IApplicationInitializedTask <TaskArgument <TContext> >, TaskArgument <TContext> >(taskArg, true);
        }