Author: krasnov
Date: 2006-11-05 10:03:51 -0500 (Sun, 05 Nov 2006)
New Revision: 67379

Modified:
   trunk/mcs/class/System.Web/System.Web/ChangeLog
   trunk/mcs/class/System.Web/System.Web/HttpContext.cs
Log:
* HttpContext.cs: implemented Profile property


Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog     2006-11-05 14:59:23 UTC 
(rev 67378)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog     2006-11-05 15:03:51 UTC 
(rev 67379)
@@ -1,3 +1,7 @@
+2006-11-05  Vladimir Krasnov  <[EMAIL PROTECTED]>
+
+       * HttpContext.cs: implemented Profile property
+
 2006-11-04 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
 
        * HttpApplication.cs: the unexpected 'tick' exceptions can be an abort

Modified: trunk/mcs/class/System.Web/System.Web/HttpContext.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpContext.cs        2006-11-05 
14:59:23 UTC (rev 67378)
+++ trunk/mcs/class/System.Web/System.Web/HttpContext.cs        2006-11-05 
15:03:51 UTC (rev 67379)
@@ -69,6 +69,9 @@
                object config_timeout;
                int timeout_possible;
                DateTime time_stamp = DateTime.UtcNow;
+#if NET_2_0
+               ProfileBase profile = null;
+#endif
 #if TARGET_JVM // No remoting support (CallContext) yet in Grasshopper
                static LocalDataStoreSlot _ContextSlot = 
Thread.GetNamedDataSlot ("Context");
 #endif
@@ -286,9 +289,17 @@
                        get { throw new NotImplementedException (); }
                }
 
-               [MonoTODO]
                public ProfileBase Profile {
-                       get { throw new NotImplementedException (); }
+                       get 
+                       {
+                               if (profile == null) {
+                                       if (Request.IsAuthenticated)
+                                               profile = ProfileBase.Create 
(User.Identity.Name);
+                                       else
+                                               profile = ProfileBase.Create 
(Request.AnonymousID, false);
+                               }
+                               return profile;
+                       }
                }
 #endif
 

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

Reply via email to