* GenericUriParserOptions.cs: New. 2.0 enum.
* UriBuilder.cs: Port == -1 is valid (default) in 2.0. Default name
is "localhhost" (not loopback) in 2.0. Fixed case where the Password
property could be null (instead of String.Empty).
* UriComponents.cs: New. 2.0 enum.
* UriFormat.cs: New. 2.0 enum.
* UriFormatException.cs: Added comments about GetObjectData.
* UriKind.cs: New. 2.0 enum.
* UriPartial.cs: Added Query value for 2.0.
svn path=/trunk/mcs/; revision=51816
+2005-10-17 Sebastien Pouliot <sebastien@ximian.com>
+
+ * GenericUriParserOptions.cs: New. 2.0 enum.
+ * UriBuilder.cs: Port == -1 is valid (default) in 2.0. Default name
+ is "localhhost" (not loopback) in 2.0. Fixed case where the Password
+ property could be null (instead of String.Empty).
+ * UriComponents.cs: New. 2.0 enum.
+ * UriFormat.cs: New. 2.0 enum.
+ * UriFormatException.cs: Added comments about GetObjectData.
+ * UriKind.cs: New. 2.0 enum.
+ * UriPartial.cs: Added Query value for 2.0.
+
2005-08-16 Daniel Drake <dsd@gentoo.org>
* Uri.cs: Various parsing fixes from bug #75144.
--- /dev/null
+//
+// System.GenericUriParserOptions enumeration
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2005 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.
+//
+
+#if NET_2_0
+
+namespace System {
+
+ [Flags]
+ public enum GenericUriParserOptions {
+
+ Default,
+ GenericAuthority,
+ AllowEmptyAuthority,
+ NoUserInfo,
+ NoPort,
+ NoQuery,
+ NoFragment,
+ DontConvertPathBackslashes,
+ DontCompressPath,
+ DontUnescapePathDotsAndSlashes
+ }
+}
+
+#endif
// Author:\r
// Lawrence Pit (loz@cable.a2000.nl)\r
//\r
-
+// Copyright (C) 2005 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
\r
using System;\r
using System.Collections;\r
-using System.Runtime.Serialization;\r
+using System.Runtime.Serialization;
using System.Text;\r
\r
// See RFC 2396 for more info on URI's.\r
\r
// Constructors \r
\r
- public UriBuilder () : this (Uri.UriSchemeHttp, "loopback")\r
+ public UriBuilder ()
+#if NET_2_0
+ : this (Uri.UriSchemeHttp, "localhost")
+#else
+ : this (Uri.UriSchemeHttp, "loopback")
+#endif\r
{ \r
}\r
\r
if (pos != -1) {\r
password = username.Substring (pos + 1);\r
username = username.Substring (0, pos);\r
+ } else {
+ password = String.Empty;\r
}\r
modified = true;\r
}\r
\r
public int Port {\r
get { return port; }\r
- set {\r
+ set {
+#if NET_2_0
+ if (value < -1)\r
+ throw new ArgumentOutOfRangeException ("value");
+#else\r
if (value < 0)\r
- throw new ArgumentOutOfRangeException ("value");\r
+ throw new ArgumentOutOfRangeException ("value");
+#endif\r
// apparently it is\r
port = value;\r
modified = true;\r
--- /dev/null
+//
+// System.UriComponents enumeration
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2005 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.
+//
+
+#if NET_2_0
+
+namespace System {
+
+ [Flags]
+ public enum UriComponents {
+
+ Schema,
+ UserInfo,
+ Host,
+ Port,
+ Path,
+ Query,
+ Fragment,
+ StrongPort,
+ KeepDelimiter = 0x40000000,
+
+ HostAndPort = Host | StrongPort,
+ StrongAuthority = Host | UserInfo | StrongPort,
+ AbsoluteUri = Schema | UserInfo | Host | Port | Path | Query | Fragment,
+ PathAndQuery = Path | Query,
+ SchemaAndServer = Schema | Host | Port,
+ SerializationInfoString = Int32.MinValue
+ }
+}
+
+#endif
--- /dev/null
+//
+// System.UriFormat enumeration
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2005 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.
+//
+
+#if NET_2_0
+
+namespace System {
+
+ public enum UriFormat {
+
+ UriEscaped = 1,
+ Unescaped,
+ SafeUnescaped,
+ }
+}
+
+#endif
//
// (C) 2001 Scott Sanders
// (C) 2002 Ximian, Inc.
-//
-
+// Copyright (C) 2005 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
using System.Runtime.Serialization;
namespace System {
+
[Serializable]
public class UriFormatException : FormatException, ISerializable
{
}
// Methods
+
+ // This effectively kills the LinkDemand from Exception.GetObjectData (if someone
+ // use the ISerializable interface to serialize the object). See unit tests.
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
base.GetObjectData (info, context);
--- /dev/null
+//
+// System.UriKind enumeration
+//
+// Author:
+// Sebastien Pouliot <sebastien@ximian.com>
+//
+// Copyright (C) 2005 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.
+//
+
+#if NET_2_0
+
+namespace System {
+
+ public enum UriKind {
+
+ RelativeOrAbsolute,
+ Absolute,
+ Relative,
+ }
+}
+
+#endif
// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
-
+// Copyright (C) 2005 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
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-
namespace System {
-
- /// <summary>
- /// </summary>
public enum UriPartial {
- /// <summary>
- /// </summary>
Scheme = 0,
-
- /// <summary>
- /// </summary>
Authority = 1,
-
- /// <summary>
- /// </summary>
Path = 2,
- } // UriPartial
-
-} // System
+#if NET_2_0
+ Query
+#endif
+ }
+}