Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Habersack <grendel@twistedcode.net>2009-10-07 04:10:03 +0400
committerMarek Habersack <grendel@twistedcode.net>2009-10-07 04:10:03 +0400
commit5c59801fff62d9ecce29044470e2a5b9960cf49d (patch)
treea4229fee7f22c69b729474470e0310ce74549387 /mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
parent8424d62c86996d7266ae07e12f150f5cf887eaed (diff)
Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare - replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture svn path=/trunk/mcs/; revision=143587
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
index 65ec6c1dfd7..513a93939df 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlInputButton.cs
@@ -30,6 +30,7 @@ using System.ComponentModel;
using System.Globalization;
using System.Reflection;
using System.Security.Permissions;
+using System.Web.Util;
namespace System.Web.UI.HtmlControls {
@@ -109,7 +110,7 @@ namespace System.Web.UI.HtmlControls {
#endif
}
- if (String.Compare (Type, "reset", true, CultureInfo.InvariantCulture) != 0)
+ if (String.Compare (Type, "reset", true, Helpers.InvariantCulture) != 0)
OnServerClick (EventArgs.Empty);
else
ResetForm (FindForm ());
@@ -254,7 +255,7 @@ namespace System.Web.UI.HtmlControls {
if (Page == null || !CausesValidation)
return false;
- CultureInfo inv = CultureInfo.InvariantCulture;
+ CultureInfo inv = Helpers.InvariantCulture;
string input_type = Type;
if (0 == String.Compare (input_type, "submit", true, inv) &&
Page.Validators.Count > 0)
@@ -271,7 +272,7 @@ namespace System.Web.UI.HtmlControls {
protected override void RenderAttributes (HtmlTextWriter writer)
{
#if NET_2_0
- CultureInfo inv = CultureInfo.InvariantCulture;
+ CultureInfo inv = Helpers.InvariantCulture;
string input_type = Type;
if (0 != String.Compare (input_type, "reset", true, inv) &&
((0 == String.Compare (input_type, "submit", true, inv)) ||
@@ -327,7 +328,7 @@ namespace System.Web.UI.HtmlControls {
options.ActionUrl = null;
options.Argument = String.Empty;
options.RequiresJavaScriptProtocol = false;
- options.ClientSubmit = (0 != String.Compare (Type, "submit", true, CultureInfo.InvariantCulture));
+ options.ClientSubmit = (0 != String.Compare (Type, "submit", true, Helpers.InvariantCulture));
options.PerformValidation = CausesValidation && Page != null && Page.Validators.Count > 0;
if (options.PerformValidation)
options.ValidationGroup = ValidationGroup;