Ejemplo n.º 1
0
 public static AppContextUser GetCurrentSingleton()
 {
     if (null == HttpContext.Current.Session.Contents[InstanceId])
     {
         lock (syncRoot)
         {
             instance = new AppContextUser();
         }
         using (var manager = LG.Owin.Identity.Managers.AppContextUserManager.GetCurrentSingleton())
         {
             HttpContext.Current.Session.Contents[ContextID] = instance;
             manager.Add(instance);
         }
     }
     else
     {
         instance = (AppContextUser)HttpContext.Current.Session.Contents[InstanceId];
     }
     return(instance);
 }
Ejemplo n.º 2
0
 public static AppContextUser GetCurrentSingleton()
 {
     if (null == HttpContext.Current.Session.Contents[InstanceId])
     {
         lock (syncRoot)
         {
             instance = new AppContextUser();
         }
         using (var manager = LG.Owin.Identity.Managers.AppContextUserManager.GetCurrentSingleton())
         {
             HttpContext.Current.Session.Contents[ContextID] = instance;
             manager.Add(instance);
         }
     }
     else
     {
         instance = (AppContextUser)HttpContext.Current.Session.Contents[InstanceId];
     }
     return instance;
 }