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); }
private void RefaceHttpApplication_EndRequest(object sender, EventArgs e) { try { IWork work = CurrentWorkAccessor.Get(); work.PublishEvent(new EndRequestEvent(this, HttpContext.Current)); work.Dispose(); } catch (Exception) { } }