2002-07-23 Tim Coleman <tim@timcoleman.com>
authorTim Coleman <tim@mono-cvs.ximian.com>
Tue, 23 Jul 2002 16:21:18 +0000 (16:21 -0000)
committerTim Coleman <tim@mono-cvs.ximian.com>
Tue, 23 Jul 2002 16:21:18 +0000 (16:21 -0000)
        * HttpCompileException.cs:
        * HttpParseException.cs:
        * HttpUnhandledException.cs:
                New stubbs created.
        * HttpApplication.cs:
        * HttpBrowserCapabilities.cs:
                Added missing methods stubbs and attributes based
                on the class status page.  Also reformatted some
                source for consistency.

svn path=/trunk/mcs/; revision=6081

mcs/class/System.Web/System.Web/HttpApplication.cs
mcs/class/System.Web/System.Web/HttpBrowserCapabilities.cs
mcs/class/System.Web/System.Web/HttpCompileException.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web/HttpParseException.cs [new file with mode: 0644]
mcs/class/System.Web/System.Web/HttpUnhandledException.cs [new file with mode: 0644]

index 34986511db358af888ef8d018b069d4d1bba486d..98e397dfd8012b186a953c45f189c8a5ad52d2b8 100644 (file)
-   // \r
+// \r
 // System.Web.HttpApplication\r
 //\r
 // Author:\r
 //   Patrik Torstensson (Patrik.Torstensson@labs2.com)\r
+//   Tim Coleman (tim@timcoleman.com)\r
 //\r
 using System;\r
 using System.ComponentModel;\r
+using System.Security.Principal;\r
 using System.Web.SessionState;\r
 \r
 namespace System.Web {\r
-   [MonoTODO()]\r
-   public class HttpApplication : IHttpAsyncHandler, IHttpHandler, IComponent, IDisposable {\r
-      private bool _CompleteRequest;\r
+       [ToolboxItem (true)]\r
+       [MonoTODO()]\r
+       public class HttpApplication : IHttpAsyncHandler, IHttpHandler, IComponent, IDisposable {\r
 \r
-      private HttpContext _Context;\r
-      private HttpContext _OverrideContext;\r
-         \r
-      private bool _InPreRequestResponseMode;\r
-\r
-      private ISite _Site;\r
-      private HttpModuleCollection _ModuleCollection;\r
-      private HttpSessionState _Session;\r
-\r
-      public event EventHandler AcquireRequestState;\r
-      public event EventHandler AuthenticateRequest;\r
-      public event EventHandler AuthorizeRequest;\r
-      public event EventHandler BeginRequest;\r
-      public event EventHandler Disposed;\r
-      public event EventHandler EndRequest;\r
-      public event EventHandler Error;\r
-      public event EventHandler PostRequestHandlerExecute;\r
-      public event EventHandler PreRequestHandlerExecute;\r
-      public event EventHandler PreSendRequestContent;\r
-      public event EventHandler PreSendRequestHeaders;\r
-      public event EventHandler ReleaseRequestState;\r
-      public event EventHandler ResolveRequestCache;\r
-      public event EventHandler UpdateRequestCache;\r
-\r
-      [MonoTODO()]\r
-      public HttpApplication() {\r
-         // Init HTTP context and the methods from HttpRuntime....\r
-      }\r
-\r
-      internal void ClearError() {\r
-         // Called from Server Utility\r
-      }\r
-\r
-      public HttpContext Context {\r
-         get {\r
-            if (null != _OverrideContext) {\r
-               return _OverrideContext;\r
-            }\r
-\r
-            return _Context;\r
-         }\r
-      }\r
-\r
-      public HttpModuleCollection Modules {\r
-         get {\r
-            if (null == _ModuleCollection) {\r
-               _ModuleCollection = new HttpModuleCollection();\r
-            }\r
-\r
-            return _ModuleCollection;\r
-         }\r
-      }\r
-\r
-      public HttpRequest Request {\r
-         get {\r
-            if (null != _Context && (!_InPreRequestResponseMode)) {\r
-               return _Context.Request;\r
-            }\r
-\r
-            throw new HttpException("Cant get request object");\r
-         }\r
-      }\r
-\r
-      public HttpResponse Response {\r
-         get {\r
-            if (null != _Context && (!_InPreRequestResponseMode)) {\r
-               return _Context.Response;\r
-            }\r
-\r
-            throw new HttpException("Cant get response object");\r
-         }\r
-      }\r
-\r
-      public HttpServerUtility Server {\r
-         get {\r
-            if (null != _Context) {\r
-               return _Context.Server;\r
-            }\r
-\r
-            return new HttpServerUtility(this);\r
-         }\r
-      }\r
-\r
-      public HttpSessionState Session {\r
-         get {\r
-            if (null != _Session) {\r
-               return _Session;\r
-            }\r
-\r
-            if (null != _Context && null != _Context.Session) {\r
-               return _Context.Session;\r
-            }\r
-\r
-            throw new HttpException("Failed to get session object");\r
-         }\r
-      }\r
-\r
-      public virtual string GetVaryByCustomString(HttpContext context, string custom) {\r
-         if (custom.ToLower() == "browser") {\r
-            return context.Request.Browser.Type;\r
-         }\r
-\r
-         return string.Empty;\r
-      }\r
-\r
-      [MonoTODO()]\r
-      IAsyncResult IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) {\r
-         throw new NotImplementedException();\r
-      }\r
-\r
-      [MonoTODO()]\r
-      void IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) {\r
-         throw new NotImplementedException();\r
-      }\r
-\r
-      [MonoTODO()]\r
-      void IHttpHandler.ProcessRequest(HttpContext context) {\r
-         throw new NotImplementedException();\r
-      }\r
-\r
-      bool IHttpHandler.IsReusable {\r
-         get {\r
-            throw new NotImplementedException();\r
-         }\r
-      }\r
-\r
-      public ISite Site {\r
-         get {\r
-            return _Site;\r
-         }\r
-\r
-         set {\r
-            _Site = value;\r
-         }\r
-      }\r
-\r
-      public void CompleteRequest() {\r
-         _CompleteRequest = true;\r
-      }\r
-\r
-      [MonoTODO("Cleanup")]\r
-      public virtual void Dispose() {\r
+               #region Fields\r
+\r
+               bool _CompleteRequest;\r
+\r
+               HttpContext _Context;\r
+               HttpContext _OverrideContext;\r
          \r
-      }\r
+               bool _InPreRequestResponseMode;\r
+\r
+               ISite _Site;\r
+               HttpModuleCollection _ModuleCollection;\r
+               HttpSessionState _Session;\r
+               IPrincipal user;\r
+\r
+               #endregion // Fields\r
+\r
+               #region Constructors\r
+\r
+               [MonoTODO()]\r
+               public HttpApplication() \r
+               {\r
+                       // Init HTTP context and the methods from HttpRuntime....\r
+               }\r
+\r
+               #endregion // Constructors\r
+\r
+               #region Properties\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpApplicationState Application {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpContext Context {\r
+                       get {\r
+                               if (null != _OverrideContext) \r
+                                       return _OverrideContext;\r
+                               return _Context;\r
+                       }\r
+               }\r
+\r
+               protected EventHandlerList Events {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               bool IHttpHandler.IsReusable {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException(); }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpModuleCollection Modules {\r
+                       get {\r
+                               if (null == _ModuleCollection) \r
+                                       _ModuleCollection = new HttpModuleCollection();\r
+                               return _ModuleCollection;\r
+                       }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpRequest Request {\r
+                       get {\r
+                               if (null != _Context && (!_InPreRequestResponseMode)) \r
+                                       return _Context.Request;\r
+                               throw new HttpException("Cant get request object");\r
+                       }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpResponse Response {\r
+                       get {\r
+                               if (null != _Context && (!_InPreRequestResponseMode)) \r
+                                       return _Context.Response;\r
+                               throw new HttpException("Cant get response object");\r
+                       }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpServerUtility Server {\r
+                       get {\r
+                               if (null != _Context) \r
+                                       return _Context.Server;\r
+                               return new HttpServerUtility(this);\r
+                       }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public HttpSessionState Session {\r
+                       get {\r
+                               if (null != _Session) \r
+                                       return _Session;\r
+                               if (null != _Context && null != _Context.Session) \r
+                                       return _Context.Session;\r
+                               throw new HttpException("Failed to get session object");\r
+                       }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public ISite Site {\r
+                       get { return _Site; }\r
+                       set { _Site = value; }\r
+               }\r
+\r
+               [Browsable (false)]\r
+               [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]\r
+               public IPrincipal User {\r
+                       get { return user; }\r
+                       [MonoTODO ("This requires the ControlPrincipal flag to be set in Flags.")]\r
+                       set { user = value; }\r
+               }\r
+\r
+               #endregion Properties\r
+\r
+               #region Methods\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnBeginRequestAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnEndRequestAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               [MonoTODO ("Implementation required.")]\r
+               public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)\r
+               {\r
+                       throw new NotImplementedException ();\r
+               }\r
+\r
+               internal void ClearError() \r
+               {\r
+                       // Called from Server Utility\r
+               }\r
+\r
+               public void CompleteRequest () \r
+               {\r
+                       _CompleteRequest = true;\r
+               }\r
+\r
+               [MonoTODO("Cleanup")]\r
+               public virtual void Dispose () \r
+               {\r
+               }\r
+\r
+               public virtual string GetVaryByCustomString (HttpContext context, string custom) \r
+               {\r
+                       if (custom.ToLower() == "browser") \r
+                               return context.Request.Browser.Type;\r
+                       return string.Empty;\r
+               }\r
+\r
+               [MonoTODO()]\r
+               IAsyncResult IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData) \r
+               {\r
+                       throw new NotImplementedException();\r
+               }\r
+\r
+               [MonoTODO()]\r
+               void IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) \r
+               {\r
+                       throw new NotImplementedException();\r
+               }\r
+\r
+               [MonoTODO()]\r
+               void IHttpHandler.ProcessRequest(HttpContext context) \r
+               {\r
+                       throw new NotImplementedException();\r
+               }\r
+\r
+               public virtual void Init() \r
+               {\r
+               }\r
+\r
+               #endregion // Methods\r
+\r
+               #region Events and Delegates\r
+\r
+               public event EventHandler AcquireRequestState;\r
+               public event EventHandler AuthenticateRequest;\r
+               public event EventHandler AuthorizeRequest;\r
+               public event EventHandler BeginRequest;\r
+               public event EventHandler Disposed;\r
+               public event EventHandler EndRequest;\r
+               public event EventHandler Error;\r
+               public event EventHandler PostRequestHandlerExecute;\r
+               public event EventHandler PreRequestHandlerExecute;\r
+               public event EventHandler PreSendRequestContent;\r
+               public event EventHandler PreSendRequestHeaders;\r
+               public event EventHandler ReleaseRequestState;\r
+               public event EventHandler ResolveRequestCache;\r
+               public event EventHandler UpdateRequestCache;\r
 \r
-      public virtual void Init() {\r
-      }\r
-   }\r
+               #endregion // Events and Delegates\r
+       }\r
 }\r
index a22567bdcfd55644e1ba98581aa92bd43eaf5205..a4c095c7f6d43b627a7eca0d790492724ac8ac67 100755 (executable)
@@ -15,144 +15,129 @@ public class HttpBrowserCapabilities : HttpCapabilitiesBase
        {
        }
 
-       public bool ActiveXControls
-       {
+       public bool ActiveXControls {
                get { return false; }
        }
 
        [MonoTODO()]
-       public bool AOL
-       {
+       public bool AOL {
                get { return false; }
        }
 
        [MonoTODO()]
-       public bool BackgroundSounds
-       {
+       public bool BackgroundSounds {
                get { return false; }
        }
 
        [MonoTODO()]
-       public bool Beta
-       {
+       public bool Beta {
                get { return false; }
        }
 
        [MonoTODO()]
-       public string Browser
-       {
+       public string Browser {
                get { return "Not Implemented"; }
        }
 
        [MonoTODO()]
-       public bool CDF
-       {
+       public bool CDF {
                get { return false; }
        }
 
        [MonoTODO()]
-       public Version ClrVersion
-       {
+       public Version ClrVersion {
                get { return new Version (0, 0); }
        }
 
        [MonoTODO()]
-       public bool Cookies
-       {
+       public bool Cookies {
                get { return true; }
        }
 
        [MonoTODO()]
-       public bool Crawler
-       {
+       public bool Crawler {
                get { return false; }
        }
 
        [MonoTODO()]
-       public Version EcmaScriptVersion
-       {
+       public Version EcmaScriptVersion {
                get { return new Version (0, 0); }
        }
 
        [MonoTODO()]
-       public bool Frames
-       {
+       public bool Frames {
                get { return true; }
        }
 
        [MonoTODO()]
-       public bool JavaApplets
-       {
+       public bool JavaApplets {
                get { return false; }
        }
 
        [MonoTODO()]
-       public bool JavaScript
-       {
+       public bool JavaScript {
                get { return true; }
        }
 
        [MonoTODO()]
-       public int MajorVersion
-       {
+       public int MajorVersion {
                get { return 0; }
        }
 
        [MonoTODO()]
-       public double MinorVersion
-       {
+       public double MinorVersion {
                get { return 0.0; }
        }
 
        [MonoTODO()]
-       public Version MSDomVersion
-       {
+       public Version MSDomVersion {
                get { return new Version (0, 0); }
        }
 
        [MonoTODO()]
-       public string Platform
-       {
+       public string Platform {
                get { return "mono::"; }
        }
 
        [MonoTODO()]
-       public bool Tables
-       {
+       public bool Tables {
                get { return true; }
        }
 
        [MonoTODO()]
-       public string Type
-       {
+       public Type TagWriter {
+               get { throw new NotImplementedException (); }
+       }
+
+       [MonoTODO()]
+       public string Type {
                get { return "4"; }
        }
 
        [MonoTODO()]
-       public bool VBScript
-       {
+       public bool VBScript {
                get { return false; }
        }
 
        [MonoTODO()]
-       public string Version
-       {
+       public string Version {
                get { return "4.0"; }
        }
 
        [MonoTODO()]
-       public bool Win16
-       {
+       public Version W3CDomVersion {
+               get { return new Version (0, 0); }
+       }
+
+       [MonoTODO()]
+       public bool Win16 {
                get { return false; }
        }
 
        [MonoTODO()]
-       public bool Win32
-       {
+       public bool Win32 {
                get { return true; }
        }
 
-
-
 }
 }
diff --git a/mcs/class/System.Web/System.Web/HttpCompileException.cs b/mcs/class/System.Web/System.Web/HttpCompileException.cs
new file mode 100644 (file)
index 0000000..3eb67c3
--- /dev/null
@@ -0,0 +1,29 @@
+// \r
+// System.Web.HttpCompileException.cs\r
+//\r
+// Author:\r
+//   Tim Coleman (tim@timcoleman.com)\r
+//\r
+// Copyright (C) Tim Coleman, 2002\r
+//\r
+\r
+using System.CodeDom;\r
+\r
+namespace System.Web {\r
+       public sealed class HttpCompileException : HttpException {\r
+\r
+               #region Properties\r
+\r
+               public CompilerResults Results {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               public string SourceCode {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               #endregion // Properties\r
+       }\r
+}\r
diff --git a/mcs/class/System.Web/System.Web/HttpParseException.cs b/mcs/class/System.Web/System.Web/HttpParseException.cs
new file mode 100644 (file)
index 0000000..6509697
--- /dev/null
@@ -0,0 +1,27 @@
+// \r
+// System.Web.HttpParseException.cs\r
+//\r
+// Author:\r
+//   Tim Coleman (tim@timcoleman.com)\r
+//\r
+// Copyright (C) Tim Coleman, 2002\r
+//\r
+\r
+namespace System.Web {\r
+       public sealed class HttpParseException : HttpException {\r
+\r
+               #region Properties\r
+\r
+               public string FileName {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               public int Line {\r
+                       [MonoTODO]\r
+                       get { throw new NotImplementedException (); }\r
+               }\r
+\r
+               #endregion // Properties\r
+       }\r
+}\r
diff --git a/mcs/class/System.Web/System.Web/HttpUnhandledException.cs b/mcs/class/System.Web/System.Web/HttpUnhandledException.cs
new file mode 100644 (file)
index 0000000..8ddec6b
--- /dev/null
@@ -0,0 +1,14 @@
+// \r
+// System.Web.HttpUnhandledException.cs\r
+//\r
+// Author:\r
+//   Tim Coleman (tim@timcoleman.com)\r
+//\r
+// Copyright (C) Tim Coleman, 2002\r
+//\r
+\r
+namespace System.Web {\r
+       public sealed class HttpUnhandledException : HttpException {\r
+\r
+       }\r
+}\r