コード例 #1
0
    public static T Get <T>(this HttpSessionBase session, string key)
    {
        var result;

        if (session.TryGetValue(key, out result))
        {
            return((T)result);
        }
        // or throw an exception, whatever you want.
        return(default(T));
    }
コード例 #2
0
 public SessionWrapper( HttpSessionBase session )
 {
     Session = session;
 }