Author: miguel
Date: 2006-11-27 23:14:21 -0500 (Mon, 27 Nov 2006)
New Revision: 68552
Modified:
trunk/mcs/class/System/System.Net/ChangeLog
trunk/mcs/class/System/System.Net/WebRequest.cs
Log:
2006-11-27 Miguel de Icaza <[EMAIL PROTECTED]>
* WebRequest.cs: Instead of throwing NotImplemented exceptions,
call GetMustImplement, that way we do not need the whitelist, and
we save a handful of opcodes.
Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2006-11-28 04:04:55 UTC (rev
68551)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2006-11-28 04:14:21 UTC (rev
68552)
@@ -1,3 +1,9 @@
+2006-11-27 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * WebRequest.cs: Instead of throwing NotImplemented exceptions,
+ call GetMustImplement, that way we do not need the whitelist, and
+ we save a handful of opcodes.
+
2006-11-21 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* HttpWebRequest.cs: add 2 more methods that are not supposed to have
Modified: trunk/mcs/class/System/System.Net/WebRequest.cs
===================================================================
--- trunk/mcs/class/System/System.Net/WebRequest.cs 2006-11-28 04:04:55 UTC
(rev 68551)
+++ trunk/mcs/class/System/System.Net/WebRequest.cs 2006-11-28 04:14:21 UTC
(rev 68552)
@@ -67,56 +67,61 @@
protected WebRequest (SerializationInfo serializationInfo,
StreamingContext streamingContext)
{
}
+
+ static Exception GetMustImplement ()
+ {
+ return new NotImplementedException ("This method must
be implemented in derived classes");
+ }
// Properties
public virtual string ConnectionGroupName {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual long ContentLength {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual string ContentType {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual ICredentials Credentials {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual WebHeaderCollection Headers {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual string Method {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual bool PreAuthenticate {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual IWebProxy Proxy {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
public virtual Uri RequestUri {
- get { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
}
public virtual int Timeout {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get { throw GetMustImplement (); }
+ set { throw GetMustImplement (); }
}
#if NET_2_0
@@ -170,17 +175,17 @@
public virtual void Abort()
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public virtual IAsyncResult BeginGetRequestStream
(AsyncCallback callback, object state)
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public virtual IAsyncResult BeginGetResponse (AsyncCallback
callback, object state)
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public static WebRequest Create (string requestUriString)
@@ -206,22 +211,22 @@
public virtual Stream EndGetRequestStream (IAsyncResult
asyncResult)
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public virtual WebResponse EndGetResponse (IAsyncResult
asyncResult)
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public virtual Stream GetRequestStream()
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
public virtual WebResponse GetResponse()
{
- throw new NotImplementedException ();
+ throw GetMustImplement ();
}
#if NET_2_0
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches