use Invariant culture for string manipulations
authorKonstantin Triger <kostat@mono-cvs.ximian.com>
Thu, 5 Apr 2007 12:07:14 +0000 (12:07 -0000)
committerKonstantin Triger <kostat@mono-cvs.ximian.com>
Thu, 5 Apr 2007 12:07:14 +0000 (12:07 -0000)
svn path=/trunk/mcs/; revision=75430

mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationPermission.cs
mcs/class/System.Configuration/System.Configuration/DpapiProtectedConfigurationProvider.cs

index 98d7ff0bd310766675632924176b6488e7f5fcf0..0228717eb356b63ce47e7f520ba07bcb9f54d75f 100644 (file)
@@ -296,8 +296,8 @@ namespace System.Configuration
                                        else if (reader.LocalName == "lockElements") {
                                                LockElements.SetFromList (reader.Value);
                                        }
-                                       else if (reader.LocalName == "lockItem") {
-                                               LockItem = (reader.Value.ToLower() == "true");
+                                       else if (reader.LocalName == "lockItem") {\r
+                                               LockItem = (reader.Value.ToLowerInvariant () == "true");
                                        }
                                        else if (reader.LocalName == "xmlns") {
                                                /* ignore */
index 25c6885e4308deddc0c324257e36f7ffd8dff34a..b32fcbbe210ad2af7345af3cc1b0b4cbb8b8ad48 100644 (file)
@@ -58,7 +58,7 @@ namespace System.Configuration {
 
                         string unrestricted = securityElement.Attribute ("Unrestricted");
                         if (unrestricted != null) {
-                                this.unrestricted = (String.Compare (unrestricted, "true", true) == 0);
+                                this.unrestricted = (String.Compare (unrestricted, "true", StringComparison.InvariantCultureIgnoreCase) == 0);
                         }
                }
 
index ec481ec9a98fd3a1701ceabed1127d7a089aabca..77afaf01a7ef592c0407c454b235e5f6e7795138 100644 (file)
@@ -59,8 +59,8 @@ it is suggested that you use the RsaProtectedConfigurationProvider.");
 
                        string flag;
 
-                       flag = configurationValues ["useMachineProtection"];
-                       if (flag != null && flag.ToLower() == "true")
+                       flag = configurationValues ["useMachineProtection"];\r
+                       if (flag != null && flag.ToLowerInvariant () == "true")\r
                                useMachineProtection = true;
                }