Author: krasnov
Date: 2006-08-08 12:57:39 -0400 (Tue, 08 Aug 2006)
New Revision: 63497

Modified:
   trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
   
trunk/mcs/class/System.Web/System.Web.SessionState/SessionInProcHandler.jvm.cs
   trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
Log:
* SessionInProcHandler.jvm.cs:
* SessionStateModule.cs: added NET_2_0 parts into TARGET_J2EE

Modified: trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog        
2006-08-08 16:53:29 UTC (rev 63496)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/ChangeLog        
2006-08-08 16:57:39 UTC (rev 63497)
@@ -1,3 +1,8 @@
+2006-08-08  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
+       * SessionInProcHandler.jvm.cs:
+       * SessionStateModule.cs: added NET_2_0 parts into TARGET_J2EE
+
 2006-07-20 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * RemoteStateServer.cs: make it inmortal.

Modified: 
trunk/mcs/class/System.Web/System.Web.SessionState/SessionInProcHandler.jvm.cs
===================================================================
--- 
trunk/mcs/class/System.Web/System.Web.SessionState/SessionInProcHandler.jvm.cs  
    2006-08-08 16:53:29 UTC (rev 63496)
+++ 
trunk/mcs/class/System.Web/System.Web.SessionState/SessionInProcHandler.jvm.cs  
    2006-08-08 16:57:39 UTC (rev 63497)
@@ -35,6 +35,7 @@
 using System.Collections;
 using System.Web;
 using System.Web.Hosting;
+using System.Web.Configuration;
 
 namespace System.Web.SessionState
 {
@@ -42,11 +43,21 @@
        class SessionInProcHandler : ISessionHandler
        {
 
+#if NET_2_0
+               SessionStateSection config;
+#else
                SessionConfig config;
+#endif
 
                public void Dispose () { }
 
-               public void Init (SessionStateModule module, HttpApplication 
context, SessionConfig config)
+               public void Init (SessionStateModule module, HttpApplication 
context,
+#if NET_2_0
+                       SessionStateSection config
+#else
+                       SessionConfig config
+#endif
+)
                {
                        this.config = config;
                }
@@ -75,7 +86,11 @@
                        state = new HttpSessionState (sessionID, // unique 
identifier
                                        new SessionDictionary(), // dictionary
                                        
HttpApplicationFactory.ApplicationState.SessionObjects,
+#if NET_2_0
+                                       (int)config.Timeout.TotalMinutes, // 
XXX is this right?  we lose some precision here, but since the timeout is in 
minutes *anyway*...
+#else
                                        config.Timeout, //lifetime before death.
+#endif
                                        true, //new session
                                        false, // is cookieless
                                        SessionStateMode.J2ee,

Modified: 
trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs    
2006-08-08 16:53:29 UTC (rev 63496)
+++ trunk/mcs/class/System.Web/System.Web.SessionState/SessionStateModule.cs    
2006-08-08 16:57:39 UTC (rev 63497)
@@ -47,6 +47,29 @@
                static object locker = new object ();
                
 #if TARGET_J2EE                
+#if NET_2_0
+               static private SessionStateSection config {
+                       get
+                       {
+                               return (SessionStateSection) 
AppDomain.CurrentDomain.GetData ("SessionStateModule.config");
+                       }
+                       set
+                       {
+                               AppDomain.CurrentDomain.SetData 
("SessionStateModule.config", value);
+                       }
+               }
+               static private Type handlerType
+               {
+                       get
+                       {
+                               return (Type) AppDomain.CurrentDomain.GetData 
("SessionStateModule.handlerType");
+                       }
+                       set
+                       {
+                               AppDomain.CurrentDomain.SetData 
("SessionStateModule.handlerType", value);
+                       }
+               }
+#else
                static private SessionConfig config {
                        get {
                                return 
(SessionConfig)AppDomain.CurrentDomain.GetData("SessionStateModule.config");
@@ -63,6 +86,7 @@
                                
AppDomain.CurrentDomain.SetData("SessionStateModule.handlerType", value);
                        }
                }
+#endif
 #else
 #if NET_2_0
                static SessionStateSection config;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to