2005-06-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 27 Jun 2005 01:23:02 +0000 (01:23 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Mon, 27 Jun 2005 01:23:02 +0000 (01:23 -0000)
* TagAttributes.cs:
* AspParser.cs:
* TemplateControlCompiler.cs: use invariant culture versions of starts/
endswith.

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

mcs/class/System.Web/System.Web.Compilation/AspParser.cs
mcs/class/System.Web/System.Web.Compilation/ChangeLog
mcs/class/System.Web/System.Web.Compilation/TagAttributes.cs
mcs/class/System.Web/System.Web.Compilation/TemplateControlCompiler.cs

index 87c88456f377140c89024a1d64f8c8676024aedc..4a42bd87e6a2b49c420f48077655ca84ef7da420 100644 (file)
@@ -32,6 +32,7 @@ using System.Collections;
 using System.Globalization;
 using System.IO;
 using System.Text;
+using System.Web.Util;
 
 namespace System.Web.Compilation
 {
@@ -188,12 +189,12 @@ namespace System.Web.Compilation
                        if (len < 10 || lastQuote != len - 1)
                                return false;
 
-                       if (!str.ToLower (CultureInfo.InvariantCulture).StartsWith ("#include "))
+                       if (!StrUtils.StartsWith (str, "#include ", true))
                                return false;
 
                        str = str.Substring (9).Trim ();
-                       bool isfile = (str.ToLower (CultureInfo.InvariantCulture).StartsWith ("file"));
-                       if (!isfile && !str.ToLower (CultureInfo.InvariantCulture).StartsWith ("virtual"))
+                       bool isfile = (StrUtils.StartsWith (str ,"file", true));
+                       if (!isfile && !StrUtils.StartsWith (str, "virtual", true))
                                return false;
 
                        pathType = (isfile) ? "file" : "virtual";
index 49a0681fa36e8cd073182747d91d17ac355f6371..6d85de25e60c675de796d92c4870d1566167efdf 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * TagAttributes.cs:
+       * AspParser.cs:
+       * TemplateControlCompiler.cs: use invariant culture versions of starts/
+       endswith.
+
 2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * TemplateControlCompiler.cs: comparison between member name and the
index d668646130f8e48ec582fba0b101d78b0d3f05de..2ecffcd604d36f74c373048580518113bcb49d07 100644 (file)
@@ -31,6 +31,7 @@
 using System;
 using System.Collections;
 using System.Text;
+using System.Web.Util;
 
 namespace System.Web.Compilation
 {
@@ -149,7 +150,7 @@ namespace System.Web.Compilation
                        if (att == null || !got_hashed)
                                return false;
 
-                       return (att.StartsWith ("<%#") && att.EndsWith ("%>"));
+                       return (StrUtils.StartsWith (att, "<%#") && StrUtils.EndsWith (att, "%>"));
                }
                
                public Hashtable GetDictionary (string key)
index 17fcc86847b0be1dac7c82743fa137b5411071ae..0718c58d5855144c0e8ea3b619cb8063fdb700ca 100644 (file)
@@ -37,6 +37,7 @@ using System.Reflection;
 using System.Text;
 using System.Web;
 using System.Web.UI;
+using System.Web.Util;
 using System.ComponentModel.Design.Serialization;
 #if NET_2_0
 using System.Collections.Specialized;
@@ -294,7 +295,7 @@ namespace System.Web.Compilation
                                return false;
 
                        string str = value.Trim ();
-                       return (str.StartsWith ("<%#") && str.EndsWith ("%>"));
+                       return (StrUtils.StartsWith (str, "<%#") && StrUtils.EndsWith (str, "%>"));
                }
 
 #if NET_2_0
@@ -302,7 +303,7 @@ namespace System.Web.Compilation
                {
                        string str = value.Trim ();
                        str = str.Substring (3).Trim ();        // eats "<%#"
-                       if (str.StartsWith ("Bind")) {
+                       if (StrUtils.StartsWith (str, "Bind")) {
                                Match match = bindRegex.Match (str);
                                if (match.Success) {
                                        string bindingName = match.Groups [1].Value;