Procházet zdrojové kódy

* DnsPermissionAttribute.cs: Fixed line endings. Set eol-style.
* HttpVersion.cs: Same.
* FtpWebResponse.cs: Same.
* HttpContinueDelegate.cs: Same.
* FtpAsyncResult.cs: Same.
* EndpointPermission.cs: Same.
* IPv6Address.cs: Same.
* FtpDataStream.cs: Same.
* SocketPermission.cs: Same.
* FileWebRequest.cs: Same.
* FileWebResponse.cs: Same.
* DnsPermission.cs: Same.
* ProtocolViolationException.cs: Same.
* MonoHttpDate.cs: Same.
* SocketPermissionAttribute.cs: Same.
* CookieException.cs: Same.
* WebResponse.cs: Same.
* DefaultCertificatePolicy.cs: Same.

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

Gert Driesen před 19 roky
rodič
revize
e92d8307ef

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

@@ -1,3 +1,24 @@
+2006-12-29  Gert Driesen  <[email protected]>
+
+        * DnsPermissionAttribute.cs: Fixed line endings.
+        * HttpVersion.cs: Same.
+        * FtpWebResponse.cs: Same.
+        * HttpContinueDelegate.cs: Same.
+        * FtpAsyncResult.cs: Same.
+        * EndpointPermission.cs: Same.
+        * IPv6Address.cs: Same.
+        * FtpDataStream.cs: Same.
+        * SocketPermission.cs: Same.
+        * FileWebRequest.cs: Same.
+	* FileWebResponse.cs: Same.
+        * DnsPermission.cs: Same.
+        * ProtocolViolationException.cs: Same.
+        * MonoHttpDate.cs: Same.
+        * SocketPermissionAttribute.cs: Same.
+        * CookieException.cs: Same.
+	* WebResponse.cs: Same.
+	* DefaultCertificatePolicy.cs: Same.
+
 2006-12-28  Gert Driesen  <[email protected]>
 
 	* IPAddress.cs: On 1.1, 4-byte addresses are not supported in the 

+ 21 - 21
mcs/class/System/System.Net/CookieException.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System.Globalization;
 using System.Runtime.Serialization;

+ 12 - 12
mcs/class/System/System.Net/DefaultCertificatePolicy.cs

@@ -1,11 +1,11 @@
-//
-// System.Net.DefaultCertificatePolicy: Default policy applicable to 
-//
-// Authors:
+//
+// System.Net.DefaultCertificatePolicy: Default policy applicable to 
+//
+// Authors:
 //	Sebastien Pouliot  <[email protected]>
 //
-// Copyright (C) 2004 Novell (http://www.novell.com)
-//
+// Copyright (C) 2004 Novell (http://www.novell.com)
+//
 
 //
 // Permission is hereby granted, free of charge, to any person obtaining
@@ -31,13 +31,13 @@
 using System.Security.Cryptography.X509Certificates;
 
 namespace System.Net {
-
+
 	internal class DefaultCertificatePolicy : ICertificatePolicy {
 
 		// This is the same default policy as used by the .NET 
 		// framework. It accepts valid certificates and (valid
-		// but) expired certificates.
-		public bool CheckValidationResult (ServicePoint point, X509Certificate certificate, WebRequest request, int certificateProblem)
+		// but) expired certificates.
+		public bool CheckValidationResult (ServicePoint point, X509Certificate certificate, WebRequest request, int certificateProblem)
 		{
 			switch (certificateProblem) {
 				case 0:			// No error
@@ -45,7 +45,7 @@ namespace System.Net {
 					return true;
 				default:
 					return false;
-			}
-		}
-	}
+			}
+		}
+	}
 }

+ 68 - 68
mcs/class/System/System.Net/DnsPermission.cs

@@ -3,46 +3,46 @@
 //
 // Authors:
 //	Lawrence Pit ([email protected])
-//	Sebastien Pouliot  <[email protected]>
+//	Sebastien Pouliot  <[email protected]>
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
 
 using System.Collections;
 using System.Security;
 using System.Security.Permissions;
 
-namespace System.Net {
+namespace System.Net {
 
 	[Serializable]
-	public sealed class DnsPermission : CodeAccessPermission, IUnrestrictedPermission {
-
-		private const int version = 1;
+	public sealed class DnsPermission : CodeAccessPermission, IUnrestrictedPermission {
+
+		private const int version = 1;
 
 		// Fields
 		bool m_noRestriction;
 		
 		// Constructors
-		public DnsPermission (PermissionState state)
+		public DnsPermission (PermissionState state)
 			: base () 
 		{						
 			m_noRestriction = (state == PermissionState.Unrestricted);
@@ -57,21 +57,21 @@ namespace System.Net {
 		
 		public override IPermission Intersect (IPermission target)
 		{
-			DnsPermission dp = Cast (target);
-			if (dp == null)
-				return null;
-			if (IsUnrestricted () && dp.IsUnrestricted ())
-				return new DnsPermission (PermissionState.Unrestricted);
+			DnsPermission dp = Cast (target);
+			if (dp == null)
+				return null;
+			if (IsUnrestricted () && dp.IsUnrestricted ())
+				return new DnsPermission (PermissionState.Unrestricted);
 			return null;
 		}
 		
 		public override bool IsSubsetOf (IPermission target) 
 		{
-			DnsPermission dp = Cast (target);
-			if (dp == null)
-				return IsEmpty ();
-
-			return (dp.IsUnrestricted () || (m_noRestriction == dp.m_noRestriction));
+			DnsPermission dp = Cast (target);
+			if (dp == null)
+				return IsEmpty ();
+
+			return (dp.IsUnrestricted () || (m_noRestriction == dp.m_noRestriction));
 		}
 
 		public bool IsUnrestricted () 
@@ -81,15 +81,15 @@ namespace System.Net {
 
 		public override SecurityElement ToXml ()
 		{
-			SecurityElement se = PermissionHelper.Element (typeof (DnsPermission), version);
+			SecurityElement se = PermissionHelper.Element (typeof (DnsPermission), version);
 			if (m_noRestriction)
 				se.AddAttribute ("Unrestricted", "true");				
 			return se;
 		}
 		
 		public override void FromXml (SecurityElement securityElement)
-		{
-			PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
+		{
+			PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
 		
 			// LAMESPEC: it says to throw an ArgumentNullException in this case				
 			if (securityElement.Tag != "IPermission")
@@ -99,34 +99,34 @@ namespace System.Net {
 		}		
 		
 		public override IPermission Union (IPermission target) 
-		{
-			DnsPermission dp = Cast (target);
-			if (dp == null)
-				return Copy ();
-			if (IsUnrestricted () || dp.IsUnrestricted ())
-				return new DnsPermission (PermissionState.Unrestricted);
-			else
-				return new DnsPermission (PermissionState.None);
+		{
+			DnsPermission dp = Cast (target);
+			if (dp == null)
+				return Copy ();
+			if (IsUnrestricted () || dp.IsUnrestricted ())
+				return new DnsPermission (PermissionState.Unrestricted);
+			else
+				return new DnsPermission (PermissionState.None);
+		}
+
+		// Internal helpers methods
+
+		private bool IsEmpty ()
+		{
+			return !m_noRestriction;
+		}
+
+		private DnsPermission Cast (IPermission target)
+		{
+			if (target == null)
+				return null;
+
+			DnsPermission dp = (target as DnsPermission);
+			if (dp == null) {
+				PermissionHelper.ThrowInvalidPermission (target, typeof (DnsPermission));
+			}
+
+			return dp;
 		}
-
-		// Internal helpers methods
-
-		private bool IsEmpty ()
-		{
-			return !m_noRestriction;
-		}
-
-		private DnsPermission Cast (IPermission target)
-		{
-			if (target == null)
-				return null;
-
-			DnsPermission dp = (target as DnsPermission);
-			if (dp == null) {
-				PermissionHelper.ThrowInvalidPermission (target, typeof (DnsPermission));
-			}
-
-			return dp;
-		}
 	}
 }

+ 25 - 25
mcs/class/System/System.Net/DnsPermissionAttribute.cs

@@ -4,32 +4,32 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System.Security;
 using System.Security.Permissions;
 
-namespace System.Net {
+namespace System.Net {
 
 	[AttributeUsage (AttributeTargets.Assembly 
 	               | AttributeTargets.Class 
@@ -40,16 +40,16 @@ namespace System.Net {
 	[Serializable]
 	public sealed class DnsPermissionAttribute : CodeAccessSecurityAttribute {
 		
-		// Constructors
+		// Constructors
 
-		public DnsPermissionAttribute (SecurityAction action)
+		public DnsPermissionAttribute (SecurityAction action)
 			: base (action)
 		{
 		}
 
 		// Methods
 		
-		public override IPermission CreatePermission () 
+		public override IPermission CreatePermission () 
 		{
 			return new DnsPermission (
 				this.Unrestricted ?

+ 23 - 23
mcs/class/System/System.Net/EndpointPermission.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
 using System.Collections;
@@ -157,8 +157,8 @@ namespace System.Net
 				int part2 = ToNumber (h2 [i]);
 				if (part2 == -1)
 					return false;				
-				if (part1 == 256)
-					continue;
+				if (part1 == 256)
+					continue;
 				if (part1 != part2 && part2 != 256)
 					return false;
 			}

+ 21 - 21
mcs/class/System/System.Net/FileWebRequest.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
 using System.Collections;

+ 21 - 21
mcs/class/System/System.Net/FileWebResponse.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
 using System.IO;

+ 13 - 13
mcs/class/System/System.Net/FtpAsyncResult.cs

@@ -9,7 +9,7 @@
 
 using System;
 using System.IO;
-using System.Threading;
+using System.Threading;
 using System.Net;
 
 #if NET_2_0
@@ -89,8 +89,8 @@ namespace System.Net
 		internal Stream Stream {
 			get {
 				return stream;
-			}
-
+			}
+
 			set { stream = value; }
 		}
 
@@ -118,9 +118,9 @@ namespace System.Net
 			lock (locker) {
 				completed = true;
 				if (waitHandle != null)
-					waitHandle.Set ();
-			}
-			DoCallback ();
+					waitHandle.Set ();
+			}
+			DoCallback ();
 		}
 
 		internal void SetCompleted (bool synch, FtpWebResponse response)
@@ -134,13 +134,13 @@ namespace System.Net
 		}
 
 		internal void DoCallback ()
-		{
-			if (callback != null)
-				try {
-					callback (this);
-				}
-				catch (Exception) {
-				}
+		{
+			if (callback != null)
+				try {
+					callback (this);
+				}
+				catch (Exception) {
+				}
 		}
 
 		// Cleanup resources

+ 24 - 24
mcs/class/System/System.Net/FtpDataStream.cs

@@ -11,7 +11,7 @@ using System;
 using System.IO;
 using System.Net.Sockets;
 using System.Runtime.Remoting.Messaging;
-using System.Threading;
+using System.Threading;
 using System.Net;
 
 #if NET_2_0
@@ -41,10 +41,10 @@ namespace System.Net
 			this.request = request;
 			this.contentLength = socket.Available;
 			this.networkStream = new NetworkStream (socket, true);
-			this.isRead = isRead;
-
-			if (request.EnableSsl) {
-				FtpWebRequest.ChangeToSSLSocket (ref networkStream);
+			this.isRead = isRead;
+
+			if (request.EnableSsl) {
+				FtpWebRequest.ChangeToSSLSocket (ref networkStream);
 			}
 
 			closewh = new ManualResetEvent (false);
@@ -91,11 +91,11 @@ namespace System.Net
 		}
 
 		public override void Close ()
-		{
-			if (!disposed) {
-				networkStream.Close ();
-				request.SetTransferCompleted ();
-				((IDisposable) this).Dispose ();
+		{
+			if (!disposed) {
+				networkStream.Close ();
+				request.SetTransferCompleted ();
+				((IDisposable) this).Dispose ();
 			}
 		}
 
@@ -116,22 +116,22 @@ namespace System.Net
 
 		int ReadInternal (byte [] buffer, int offset, int size)
 		{
-			int nbytes;
-
+			int nbytes;
+
 			request.CheckIfAborted ();
 
 			try {
 				// Probably it would be better to have the socket here
-				nbytes = networkStream.Read (buffer, offset, size);
+				nbytes = networkStream.Read (buffer, offset, size);
 			} catch (IOException) {
 				throw new ProtocolViolationException ("Server commited a protocol violation");
 			}
 
-			totalRead += nbytes;
-			if (nbytes == 0) {
-				contentLength = totalRead;
-				request.SetTransferCompleted ();
-				networkStream.Close ();
+			totalRead += nbytes;
+			if (nbytes == 0) {
+				contentLength = totalRead;
+				request.SetTransferCompleted ();
+				networkStream.Close ();
 			}
 			
 			return nbytes;
@@ -171,8 +171,8 @@ namespace System.Net
 		}
 
 		public override int Read (byte [] buffer, int offset, int size)
-		{
-			request.CheckIfAborted ();
+		{
+			request.CheckIfAborted ();
 			IAsyncResult ar = BeginRead (buffer, offset, size, null, null);
 			if (!ar.IsCompleted && !ar.AsyncWaitHandle.WaitOne (request.ReadWriteTimeout, false))
 				throw new WebException ("Read timed out.", WebExceptionStatus.Timeout);
@@ -184,8 +184,8 @@ namespace System.Net
 		delegate void WriteDelegate (byte [] buffer, int offset, int size);
 		
 		void WriteInternal (byte [] buffer, int offset, int size)
-		{
-			request.CheckIfAborted ();
+		{
+			request.CheckIfAborted ();
 			
 			try {
 				networkStream.Write (buffer, offset, size);
@@ -227,8 +227,8 @@ namespace System.Net
 		}
 
 		public override void Write (byte [] buffer, int offset, int size)
-		{
-			request.CheckIfAborted ();
+		{
+			request.CheckIfAborted ();
 			IAsyncResult ar = BeginWrite (buffer, offset, size, null, null);
 			if (!ar.IsCompleted && !ar.AsyncWaitHandle.WaitOne (request.ReadWriteTimeout, false))
 				throw new WebException ("Read timed out.", WebExceptionStatus.Timeout);

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

@@ -127,8 +127,8 @@ namespace System.Net
 			if (disposed)
 				return;
 			
-			disposed = true;
-			if (stream != null)
+			disposed = true;
+			if (stream != null)
 				stream.Close ();
 			stream = null;
 		}

+ 23 - 23
mcs/class/System/System.Net/HttpContinueDelegate.cs

@@ -4,31 +4,31 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 namespace System.Net
 {
 	public delegate void HttpContinueDelegate (
-			int StatusCode,
-	   		WebHeaderCollection httpHeaders);
+		int StatusCode,
+		WebHeaderCollection httpHeaders);
 }

+ 21 - 21
mcs/class/System/System.Net/HttpVersion.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
 

+ 83 - 83
mcs/class/System/System.Net/IPv6Address.cs

@@ -10,27 +10,27 @@
 //           out that in ms.net there's an internal class called
 //           IPv6Address in namespace System.
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 
 using System;
@@ -159,7 +159,7 @@ namespace System.Net {
 			if (len > (ipv4 ? 6 : 8)) 
 				throw new FormatException ("Not a valid IPv6 address");
 			int piecedouble = -1;
-			bool ipv6 = false;
+			bool ipv6 = false;
 			for (int i = 0; i < len; i++) {
 				string piece = pieces [i];
 				if (piece == "!")
@@ -175,9 +175,9 @@ namespace System.Net {
 						} catch (ArgumentException) {
 							throw new FormatException ("Not a valid IPv6 address");
 						}
-					addr [i] = (ushort) p;
-					if (p != 0 || (i == 5 && p != 0xffff))
-						ipv6 = true;
+					addr [i] = (ushort) p;
+					if (p != 0 || (i == 5 && p != 0xffff))
+						ipv6 = true;
 				}
 			}
 
@@ -194,20 +194,20 @@ namespace System.Net {
 			} else if (len != (ipv4 ? 6 : 8)) 
 				throw new FormatException ("Not a valid IPv6 address");
 
-			// check IPv4 validity
-			if (ipv4 && !ipv6) {
-				for (int i = 0; i < 5; i++) {
-					if (addr [i] != 0)
-						throw new FormatException ("Not a valid IPv6 address");
-				}
-
-				if (addr [5] != 0 && addr [5] != 0xffff)
-					throw new FormatException ("Not a valid IPv6 address");
-			}
-
-			return new IPv6Address (addr, prefixLen, scopeId);
-		}
-
+			// check IPv4 validity
+			if (ipv4 && !ipv6) {
+				for (int i = 0; i < 5; i++) {
+					if (addr [i] != 0)
+						throw new FormatException ("Not a valid IPv6 address");
+				}
+
+				if (addr [5] != 0 && addr [5] != 0xffff)
+					throw new FormatException ("Not a valid IPv6 address");
+			}
+
+			return new IPv6Address (addr, prefixLen, scopeId);
+		}
+
 		public ushort [] Address {
 			get { return address; }
 		}
@@ -232,44 +232,44 @@ namespace System.Net {
 		public AddressFamily AddressFamily {
 			get { return AddressFamily.InterNetworkV6; }
 		}
-
-		public static bool IsLoopback (IPv6Address addr)
-		{
-			if (addr.address [7] != 1)
-				return false;
-
-			int x = addr.address [6] >> 8;
-			if (x != 0x7f && x != 0)
-				return false;
-
-			for (int i = 0; i < 4; i++) {
-				if (addr.address [i] != 0)
-					return false;
-			}
-
-			if (addr.address [5] != 0 && addr.address [5] != 0xffff)
-				return false;
-
-			return true;
-		}
-
-		private static ushort SwapUShort (ushort number)
-		{
-			return (ushort) ( ((number >> 8) & 0xFF) + ((number << 8) & 0xFF00) );
-		}
-
-		// Convert the address into a format expected by the IPAddress (long) ctor
-		private int AsIPv4Int ()
-		{
-			return (SwapUShort (address [7]) << 16) + SwapUShort (address [6]);
-		}			
-
+
+		public static bool IsLoopback (IPv6Address addr)
+		{
+			if (addr.address [7] != 1)
+				return false;
+
+			int x = addr.address [6] >> 8;
+			if (x != 0x7f && x != 0)
+				return false;
+
+			for (int i = 0; i < 4; i++) {
+				if (addr.address [i] != 0)
+					return false;
+			}
+
+			if (addr.address [5] != 0 && addr.address [5] != 0xffff)
+				return false;
+
+			return true;
+		}
+
+		private static ushort SwapUShort (ushort number)
+		{
+			return (ushort) ( ((number >> 8) & 0xFF) + ((number << 8) & 0xFF00) );
+		}
+
+		// Convert the address into a format expected by the IPAddress (long) ctor
+		private int AsIPv4Int ()
+		{
+			return (SwapUShort (address [7]) << 16) + SwapUShort (address [6]);
+		}			
+
 		public bool IsIPv4Compatible ()
 		{
 			for (int i = 0; i < 6; i++) 
 				if (address [i] != 0)
 					return false;
-			return (AsIPv4Int () > 1);
+			return (AsIPv4Int () > 1);
 		}
 		
 		public bool IsIPv4Mapped ()
@@ -296,7 +296,7 @@ namespace System.Net {
 				if(IsIPv4Mapped())
 					s.Append("ffff:");
 
-				s.Append(new IPAddress( AsIPv4Int ()).ToString ());
+				s.Append(new IPAddress( AsIPv4Int ()).ToString ());
 
 				return s.ToString ();
 			}
@@ -346,18 +346,18 @@ namespace System.Net {
 			}
 			return s.ToString ();
 		}
-
-		public string ToString (bool fullLength)
-		{
-			if (!fullLength)
-				return ToString ();
-
-			StringBuilder sb = new StringBuilder ();
-			for (int i=0; i < address.Length - 1; i++) {
+
+		public string ToString (bool fullLength)
+		{
+			if (!fullLength)
+				return ToString ();
+
+			StringBuilder sb = new StringBuilder ();
+			for (int i=0; i < address.Length - 1; i++) {
 				sb.AppendFormat ("{0:X4}:", address [i]);
-			}
+			}
 			sb.AppendFormat ("{0:X4}", address [address.Length - 1]);
-			return sb.ToString ();
+			return sb.ToString ();
 		}
 
 		/// <returns>

+ 21 - 21
mcs/class/System/System.Net/MonoHttpDate.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System;
 using System.Globalization;

+ 21 - 21
mcs/class/System/System.Net/ProtocolViolationException.cs

@@ -4,27 +4,27 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System.Globalization;
 using System.Runtime.Serialization;

+ 22 - 22
mcs/class/System/System.Net/SocketPermission.cs

@@ -4,33 +4,33 @@
 // Author:
 //   Lawrence Pit ([email protected])
 //
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
+
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 
 using System.Collections;
 using System.Security;
 using System.Security.Permissions;
 
-namespace System.Net {
+namespace System.Net {
 
 	[Serializable]
 	public sealed class SocketPermission : CodeAccessPermission, IUnrestrictedPermission

+ 116 - 116
mcs/class/System/System.Net/SocketPermissionAttribute.cs

@@ -1,7 +1,7 @@
-//
-// System.Net.SocketPermissionAttribute.cs
-//
-// Author:
+//
+// System.Net.SocketPermissionAttribute.cs
+//
+// Author:
 //	Lawrence Pit ([email protected])
 //	Sebastien Pouliot  <[email protected]>
 //
@@ -26,133 +26,133 @@
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-
-using System.Security;
-using System.Security.Permissions;
-
+
+using System.Security;
+using System.Security.Permissions;
+
 namespace System.Net {
-
-	[AttributeUsage (AttributeTargets.Assembly 
-	               | AttributeTargets.Class 
-	               | AttributeTargets.Struct 
-	               | AttributeTargets.Constructor 
-	               | AttributeTargets.Method, AllowMultiple = true, Inherited = false)
-	]	
-	[Serializable]
+
+	[AttributeUsage (AttributeTargets.Assembly 
+	               | AttributeTargets.Class 
+	               | AttributeTargets.Struct 
+	               | AttributeTargets.Constructor 
+	               | AttributeTargets.Method, AllowMultiple = true, Inherited = false)
+	]	
+	[Serializable]
 	public sealed class SocketPermissionAttribute : CodeAccessSecurityAttribute {
-
-		// Fields
-		string m_access;
-		string m_host;
-		string m_port;
-		string m_transport;
-		
-		// Constructors
+
+		// Fields
+		string m_access;
+		string m_host;
+		string m_port;
+		string m_transport;
+		
+		// Constructors
 		public SocketPermissionAttribute (SecurityAction action)
-			: base (action)
-		{
-		}
-
-		// Properties
-
-		public string Access {
-			get { return m_access; }
-			set { 
-				if (m_access != null)
-					AlreadySet ("Access");
-
-				m_access = value;
-			}
-		}
-
-		public string Host {
-			get { return m_host; }
-			set { 
-				if (m_host != null)
-					AlreadySet ("Host");
-
-				m_host = value;
-			}
-		}
-
-		public string Port {
-			get { return m_port; }
-			set { 
-				if (m_port != null)
-					AlreadySet ("Port");
-
-				m_port = value;
-			}
-		}
-
-		public string Transport {
-			get { return m_transport; }
-			set { 
-				if (m_transport != null)
-					AlreadySet ("Transport");
-
-				m_transport = value;
-			}
-		}
-		
-		// Methods
-		
+			: base (action)
+		{
+		}
+
+		// Properties
+
+		public string Access {
+			get { return m_access; }
+			set { 
+				if (m_access != null)
+					AlreadySet ("Access");
+
+				m_access = value;
+			}
+		}
+
+		public string Host {
+			get { return m_host; }
+			set { 
+				if (m_host != null)
+					AlreadySet ("Host");
+
+				m_host = value;
+			}
+		}
+
+		public string Port {
+			get { return m_port; }
+			set { 
+				if (m_port != null)
+					AlreadySet ("Port");
+
+				m_port = value;
+			}
+		}
+
+		public string Transport {
+			get { return m_transport; }
+			set { 
+				if (m_transport != null)
+					AlreadySet ("Transport");
+
+				m_transport = value;
+			}
+		}
+		
+		// Methods
+		
 		public override IPermission CreatePermission () 
-		{
-			if (this.Unrestricted)
-				return new SocketPermission (PermissionState.Unrestricted);
-
-			string missing = String.Empty;
-			if (m_access == null) 
-				missing += "Access, ";
-			if (m_host == null) 
-				missing += "Host, ";
-			if (m_port == null) 
-				missing += "Port, ";
+		{
+			if (this.Unrestricted)
+				return new SocketPermission (PermissionState.Unrestricted);
+
+			string missing = String.Empty;
+			if (m_access == null) 
+				missing += "Access, ";
+			if (m_host == null) 
+				missing += "Host, ";
+			if (m_port == null) 
+				missing += "Port, ";
 			if (m_transport == null) 
-				missing += "Transport, ";
+				missing += "Transport, ";
 			if (missing.Length > 0) {
 				string msg = Locale.GetText ("The value(s) for {0} must be specified.");
 				missing = missing.Substring (0, missing.Length - 2); // remove last separator
 				throw new ArgumentException (String.Format (msg, missing));
-			}
-
-			NetworkAccess access;
-			TransportType transport;
-			int port = SocketPermission.AllPorts;
-
-			if (String.Compare (m_access, "Connect", true) == 0)
-				access = NetworkAccess.Connect;
-			else if (String.Compare (m_access, "Accept", true) == 0)
-				access = NetworkAccess.Accept;
-			else {
+			}
+
+			NetworkAccess access;
+			TransportType transport;
+			int port = SocketPermission.AllPorts;
+
+			if (String.Compare (m_access, "Connect", true) == 0)
+				access = NetworkAccess.Connect;
+			else if (String.Compare (m_access, "Accept", true) == 0)
+				access = NetworkAccess.Accept;
+			else {
 				string msg = Locale.GetText ("The parameter value for 'Access', '{1}, is invalid.");
 				throw new ArgumentException (String.Format (msg, m_access));
-			}
-
-			if (String.Compare (m_port, "All", true) != 0) {
-				try {
-					port = Int32.Parse (m_port);					
+			}
+
+			if (String.Compare (m_port, "All", true) != 0) {
+				try {
+					port = Int32.Parse (m_port);					
 				} 
-				catch {
+				catch {
 					string msg = Locale.GetText ("The parameter value for 'Port', '{1}, is invalid.");
 					throw new ArgumentException (String.Format (msg, m_port));
-				}
-				// test whether port number is valid..
-				new IPEndPoint (1, port);
-			}
-
-			try {
-				transport = (TransportType) Enum.Parse (typeof (TransportType), m_transport, true);
+				}
+				// test whether port number is valid..
+				new IPEndPoint (1, port);
+			}
+
+			try {
+				transport = (TransportType) Enum.Parse (typeof (TransportType), m_transport, true);
 			}
-			catch {
+			catch {
 				string msg = Locale.GetText ("The parameter value for 'Transport', '{1}, is invalid.");
 				throw new ArgumentException (String.Format (msg, m_transport));
-			}
-						
-			SocketPermission perm = new SocketPermission (PermissionState.None);
-			perm.AddPermission (access, transport, m_host, port);
-			return perm;
+			}
+						
+			SocketPermission perm = new SocketPermission (PermissionState.None);
+			perm.AddPermission (access, transport, m_host, port);
+			return perm;
 		}
 
 		// helpers
@@ -162,5 +162,5 @@ namespace System.Net {
 			string msg = Locale.GetText ("The parameter '{0}' can be set only once.");
 			throw new ArgumentException (String.Format (msg, property), property);
 		}
-	}
-}
+	}
+}