Common/SessionAdapter.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/**********************************************
 * 类作用:   Session封装
 * 建立人:   abaal
 * 建立时间: 2008-09-03 
 * Copyright (C) 2007-2008 abaal
 * All rights reserved
 * http://blog.csdn.net/abaal888
 ***********************************************/

using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using System.Web.SessionState;
using System.Web;

namespace Svnhost.Common
{
    /// <summary>
    /// 类名:SessionAdapter
    /// 功能描述:Session封装	
    /// 作 者: abaal
    /// 日 期: 2008-09-03
    public class SessionAdapter : MarshalByRefObject, IDictionary
    {
        private HttpSessionState _session;

        private static SessionAdapter _SessionAdapter;

        public static SessionAdapter Session
        {
            get
            {
                if (_SessionAdapter == null)
                {
                    _SessionAdapter= new SessionAdapter();
                }
                return _SessionAdapter;
            }
        }

      
        private SessionAdapter()
        {
            _session = HttpContext.Current.Session;
        }

      
        IDictionaryEnumerator IDictionary.GetEnumerator()
        {
            throw new NotImplementedException();
        }

     
        public ICollection Keys
        {
            get { return _session.Keys; }
        }

      
后面还有 82 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。