public static void CreateContext(OfflineWebSession webSession, string method, string url, NameValueCollection postData) { WebAppConfig.Init(webSession.MapPath); HttpContextBase context = new OfflineHttpContext(webSession, method, url, postData); Current = context; context.SessionObject = WebAppHelper.CreateSessionObject(); WebAppConfig.Fire_SessionCreated(context.SessionObject); }
public static void CreateContext(HttpContext httpContext) { WebAppConfig.Init(); HttpContextBase context = new OnlineHttpContext(httpContext); Current = context; if (httpContext.Session == null) { return; } context.SessionObject = WebAppHelper.CreateSessionObject(); WebAppConfig.Fire_SessionCreated(context.SessionObject); }