public void Initialize()
        {
            // TODO : thread-saferty?
            _story = null;

            var httpContext = HttpContext.Current;

            ApplicationContext = new ApplicationContext();
            ApplicationContext.ContextParameters = new Dictionary<string, object>();

            ApplicationContext.ContextParameters.Add("requestType", httpContext.Request.RequestType);

            foreach (var item in httpContext.Request.Form.AllKeys)
            {
                ApplicationContext.ContextParameters.Add(item, httpContext.Request.Form[item]);
            }

            foreach (var item in httpContext.Request.QueryString.AllKeys)
            {
                ApplicationContext.ContextParameters.Add(item, httpContext.Request.QueryString[item]);
            }

            ApplicationContext.ContextParameters.Add("UserID", httpContext.Session["UserID"]);

            if (httpContext.Request.UrlReferrer != null)
            {
                ApplicationContext.ContextParameters.Add("UrlReferer", httpContext.Request.UrlReferrer.ToString());
            }

            ApplicationContext.ContextParameters.Add("Url", httpContext.Request.RawUrl);
        }
 public AcmActionInvoker(ApplicationContext context)
 {
     _appContext = context;
 }
Пример #3
0
 public AcmController(ApplicationContext context)
 {
     _context = context;
 }
 public AcmMethodDescriptor(ControllerDescriptor descriptor, string actionName, ApplicationContext appContext)
 {
     _controllerDescriptor = descriptor;
     _actionName = actionName;
     _appContext = appContext;
 }