Author: kostat
Date: 2007-12-25 09:52:20 -0500 (Tue, 25 Dec 2007)
New Revision: 91877
Modified:
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/SessionWrapper.cs
Log:
do the IHttpExtendedHandler analyzis ourselves
Modified: trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/SessionWrapper.cs
===================================================================
--- trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/SessionWrapper.cs
2007-12-25 14:32:18 UTC (rev 91876)
+++ trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/SessionWrapper.cs
2007-12-25 14:52:20 UTC (rev 91877)
@@ -17,18 +17,11 @@
if (IRequiresSessionStateType.IsAssignableFrom (type))
return
IReadOnlySessionStateType.IsAssignableFrom (type) ?
- new ReadOnlySessionWrapperHandler
(handler) : new SessionWrapperHandler (handler);
+ (handler is IHttpExtendedHandler ?
(IHttpHandler) new ReadOnlySessionWrapperExtendedHandler
((IHttpExtendedHandler) handler) : new ReadOnlySessionWrapperHandler (handler))
:
+ (handler is IHttpExtendedHandler ? new
SessionWrapperExtendedHandler ((IHttpExtendedHandler) handler) : new
SessionWrapperHandler (handler));
return handler;
}
- public static IHttpHandler WrapHandler (IHttpExtendedHandler
handler) {
- Type type = (Type) ((IServiceProvider)
handler).GetService (typeof (Type));
- if (IRequiresSessionStateType.IsAssignableFrom (type))
- return
IReadOnlySessionStateType.IsAssignableFrom (type) ?
- new
ReadOnlySessionWrapperExtendedHandler (handler) : new
SessionWrapperExtendedHandler (handler);
- return handler;
- }
-
#region SessionWrappers
class SessionWrapperHandler : IHttpHandler,
IRequiresSessionState, IServiceProvider
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches