打印本文 打印本文 关闭窗口 关闭窗口
[ASP.NET]重构Session确实让代码简洁干净了不少
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3467  更新时间:2009/4/23 10:39:09  文章录入:mintao  责任编辑:mintao
    }
    #endregion
    private: GetValue( eKeys eKey )#region private: GetValue( eKeys eKey )
    /**//// <summary>
    /// Gets the session value from the specified key.
    /// </summary>
    /// <param name="eKey">The key to get the value from</param>
    /// <returns>The session value for the specified session key.
    /// If the key does not exist, null is returned.
    /// </returns>
    private static object GetValue( eKeys eKey )
    {
      return HttpContext.Current.Items[ eKey.ToString() ];
    }
    #endregion

    private SetMandatoryValue( eKeys eKey, Object oValue )#region private SetMandatoryValue( eKeys eKey, Object oValue )
    private static void SetMandatoryValue( eKeys eKey, Object oValue )
    {
      if ( null == oValue ) 
      {
        throw new ApplicationException(  String.Format(sMANDATORY_SESSION_VALUE_INVALID_NULL, eKey.ToString() ) );
      }
    }
    #endregion
    private SetValue( eKeys eKey, Object oValue)#region private SetValue( eKeys eKey, Object oValue)

上一页  [1] [2] [3] [4] [5]  下一页

打印本文 打印本文 关闭窗口 关闭窗口