瀏覽代碼

2005-11-17 Gonzalo Paniagua Javier <[email protected]>

	* HttpListenerPrefixCollection.cs:
	* HttpWebResponse.cs:
	* Dns.cs:
	* HttpListenerRequest.cs:
	* HttpWebRequest.cs:
	* HttpListenerResponse.cs: a few signature fixes for 2.0.


svn path=/trunk/mcs/; revision=53210
Gonzalo Paniagua Javier 20 年之前
父節點
當前提交
835abe7513

+ 9 - 0
mcs/class/System/System.Net/ChangeLog

@@ -1,3 +1,12 @@
+2005-11-17 Gonzalo Paniagua Javier <[email protected]>
+
+	* HttpListenerPrefixCollection.cs:
+	* HttpWebResponse.cs:
+	* Dns.cs:
+	* HttpListenerRequest.cs:
+	* HttpWebRequest.cs:
+	* HttpListenerResponse.cs: a few signature fixes for 2.0.
+
 2005-11-17 Gonzalo Paniagua Javier <[email protected]>
 
 	* HttpListenerPrefixCollection.cs:

+ 5 - 0
mcs/class/System/System.Net/Dns.cs

@@ -35,9 +35,14 @@ using System.Runtime.CompilerServices;
 using System.Runtime.Remoting.Messaging;
 
 namespace System.Net {
+#if NET_2_0
+	public static class Dns {
+#else
 	public sealed class Dns {
 
 		private Dns () {}
+#endif
+
 		static Dns ()
 		{
 			System.Net.Sockets.Socket.CheckProtocolSupport();

+ 2 - 2
mcs/class/System/System.Net/HttpListenerPrefixCollection.cs

@@ -89,12 +89,12 @@ namespace System.Net {
 			((ICollection) prefixes).CopyTo (array, offset);
 		}
 
-		public IEnumerator GetEnumerator ()
+		public IEnumerator<string> GetEnumerator ()
 		{
 			return prefixes.GetEnumerator ();
 		}
 
-		IEnumerator<string> IEnumerable<string>.GetEnumerator ()
+		IEnumerator IEnumerable.GetEnumerator ()
 		{
 			return prefixes.GetEnumerator ();
 		}

+ 0 - 9
mcs/class/System/System.Net/HttpListenerRequest.cs

@@ -348,15 +348,6 @@ namespace System.Net {
 			return null;
 		}
 #endif
-		public override bool Equals (object obj)
-		{
-			return false;
-		}
-
-		public override int GetHashCode ()
-		{
-			return base.GetHashCode (); // May be use the Guid?
-		}
 	}
 }
 #endif

+ 0 - 10
mcs/class/System/System.Net/HttpListenerResponse.cs

@@ -370,16 +370,6 @@ namespace System.Net {
 			version = templateResponse.version;
 		}
 
-		public override bool Equals (object obj)
-		{
-			return false;
-		}
-
-		public override int GetHashCode ()
-		{
-			return base.GetHashCode ();
-		}
-
 		public void Redirect (string url)
 		{
 			StatusCode = 302; // Found

+ 2 - 1
mcs/class/System/System.Net/HttpWebRequest.cs

@@ -552,11 +552,12 @@ namespace System.Net
 				throw new InvalidOperationException ("rangeSpecifier");
 			webHeaders.RemoveAndAdd ("Range", value + from + "-" + to);	
 		}
-		
+#if !NET_2_0
 		public override int GetHashCode ()
 		{
 			return base.GetHashCode ();
 		}
+#endif
 		
 		void CommonChecks (bool putpost)
 		{

+ 7 - 3
mcs/class/System/System.Net/HttpWebResponse.cs

@@ -224,12 +224,13 @@ namespace System.Net
 		}
 
 		// Methods
-		
+#if !NET_2_0
 		public override int GetHashCode ()
 		{
 			CheckDisposed ();
 			return base.GetHashCode ();
 		}
+#endif
 		
 		public string GetResponseHeader (string headerName)
 		{
@@ -288,8 +289,11 @@ namespace System.Net
 			Dispose (true);
 			GC.SuppressFinalize (this);  
 		}
-		
-		protected virtual void Dispose (bool disposing) 
+
+#if !NET_2_0
+		protected virtual
+#endif
+		void Dispose (bool disposing) 
 		{
 			if (this.disposed)
 				return;