+
+ // internal stuff
+
+#if NET_2_0
+ internal void CheckUrl (string url)
+ {
+ // In .NET 1.x Url class checked the validity of the
+ // URL but that's no more the case in 2.x - but we
+ // still need the check done here
+ int protocolPos = url.IndexOf (Uri.SchemeDelimiter);
+ string u = (protocolPos < 0) ? "file://" + url : url;
+
+ Uri uri = new Uri (u, false, false);
+ // no * except for the "lone star" case
+ if (uri.Host.IndexOf ('*') >= 1) {
+ string msg = Locale.GetText ("Invalid * character in url");
+ throw new ArgumentException (msg, "name");
+ }
+ }
+#endif