public IHttpController Create(HttpRequestMessage request, HttpControllerDescriptor controllerDescriptor, Type controllerType)
        {
            HttpContext     httpContext = HttpContext.Current;
            IWork           work        = httpContext.GetWork();
            IHttpController controller  = work.CreateComponent(controllerType) as IHttpController;

            work.PublishEvent(new ControllerCreatedEvent(this,
                                                         request,
                                                         controllerDescriptor,
                                                         controller));
            return(controller);
        }
示例#2
0
 private void RefaceHttpApplication_EndRequest(object sender, EventArgs e)
 {
     try
     {
         IWork work = CurrentWorkAccessor.Get();
         work.PublishEvent(new EndRequestEvent(this, HttpContext.Current));
         work.Dispose();
     }
     catch (Exception)
     {
     }
 }