Exemplo n.º 1
0
 private void SetContext()
 {
     var ctx = new ServiceContext()
                   {
                       LoginIP = "127.0.0.1",
                       LoginDate = DateTime.Now,
                       UserCode = "Allen" ,
                       UserID = "",
                   };
     ContextSession.Current = ctx;
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 public ServiceContextManager()
 {
     //var context = CallContext.GetData(SESSIONCOTEXTKEY) as  ServiceContext ;
     var context = ContextSession.Current;
     this.Value = context ?? default(ServiceContext);
 }
Exemplo n.º 4
0
 public ServiceContextManager(ServiceContext value)
 {
     this.Value = value;
 }