diff options
author | Marek Habersack <grendel@twistedcode.net> | 2009-10-07 04:10:03 +0400 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2009-10-07 04:10:03 +0400 |
commit | 5c59801fff62d9ecce29044470e2a5b9960cf49d (patch) | |
tree | a4229fee7f22c69b729474470e0310ce74549387 /mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs | |
parent | 8424d62c86996d7266ae07e12f150f5cf887eaed (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.WebControls/TableStyle.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs index 859cc6e0a84..512d642b2f4 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/TableStyle.cs @@ -30,6 +30,7 @@ using System.ComponentModel; using System.Globalization; using System.Security.Permissions; using System.Web.UI; +using System.Web.Util; namespace System.Web.UI.WebControls { @@ -185,11 +186,11 @@ namespace System.Web.UI.WebControls { // note: avoid calling properties multiple times int i = CellPadding; if (i != -1) - writer.AddAttribute (HtmlTextWriterAttribute.Cellpadding, i.ToString (CultureInfo.InvariantCulture), false); + writer.AddAttribute (HtmlTextWriterAttribute.Cellpadding, i.ToString (Helpers.InvariantCulture), false); i = CellSpacing; if (i != -1) { - writer.AddAttribute (HtmlTextWriterAttribute.Cellspacing, i.ToString (CultureInfo.InvariantCulture), false); + writer.AddAttribute (HtmlTextWriterAttribute.Cellspacing, i.ToString (Helpers.InvariantCulture), false); if (i == 0) { writer.AddStyleAttribute(HtmlTextWriterStyle.BorderCollapse, "collapse"); } @@ -231,7 +232,7 @@ namespace System.Web.UI.WebControls { } else if (BorderWidth.IsEmpty) { writer.AddAttribute (HtmlTextWriterAttribute.Border, "1", false); } else { - writer.AddAttribute (HtmlTextWriterAttribute.Border, BorderWidth.Value.ToString (CultureInfo.InvariantCulture)); + writer.AddAttribute (HtmlTextWriterAttribute.Border, BorderWidth.Value.ToString (Helpers.InvariantCulture)); } #if !NET_2_0 |