コード例 #1
0
ファイル: MvcSession.cs プロジェクト: zyj0021/mvcsolution
 public static MvcSession GetMvcSession(this HttpSessionState session)
 {
     if (session[MvcSessionKey] == null)
     {
         var mvcSession = new MvcSession();
         mvcSession.Init();
         session[MvcSessionKey] = mvcSession;
         return(mvcSession);
     }
     return(session[MvcSessionKey] as MvcSession);
 }
コード例 #2
0
ファイル: MvcSession.cs プロジェクト: yuandong618/mvcsolution
 public static MvcSession GetMvcSession(this HttpSessionState session)
 {
     if (session[MvcSessionKey] == null)
     {
         var mvcSession = new MvcSession();
         mvcSession.Init();
         session[MvcSessionKey] = mvcSession;
         return mvcSession;
     }
     return session[MvcSessionKey] as MvcSession;
 }