private void SetContext() { var ctx = new ServiceContext() { LoginIP = "127.0.0.1", LoginDate = DateTime.Now, UserCode = "Allen" , UserID = "", }; ContextSession.Current = ctx; }
protected void Session_Start(object sender, EventArgs e) { //ContextSession.Provider = new HttpContextSessionProvider(); var ctx = new ServiceContext() { LoginIP = "127.0.0.1", LoginDate = DateTime.Now, Token = Guid.NewGuid().ToString(), Content = new Dictionary<string, string>(), UserCode = "Allen", UserID = "", UserName = "******" }; ContextSession.Current = ctx; }
public ServiceContextManager() { //var context = CallContext.GetData(SESSIONCOTEXTKEY) as ServiceContext ; var context = ContextSession.Current; this.Value = context ?? default(ServiceContext); }
public ServiceContextManager(ServiceContext value) { this.Value = value; }