summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/StringUtil.cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-12-29 21:01:16 +0100
committerJose <jose@zeroc.com>2016-12-29 21:01:16 +0100
commit54941beff80f3ebab2b15af4609c7ec8bc0d941e (patch)
treebdd4eb6573f5c4673c2129cc2eb616b1188fc543 /csharp/src/Ice/StringUtil.cs
parentJavaScript Ice.Long fixes and improvements (diff)
downloadice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.tar.bz2
ice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.tar.xz
ice-54941beff80f3ebab2b15af4609c7ec8bc0d941e.zip
CSharp cleanup and fixes:
- Add EditorBrowsable(EditorBrowsableState.Never) to hidde internal public methods from Intellisense, see ICE-7448. - Remove Base64 and replace it with .NET System.Convert see ICE-7477 - Remove SysLogger as that was only used by Mono - Simplify ThreadPriority setting - Remove using statements that are not required - Normalize string, char, object spell, preferred over String, Char, Object - Shorthen qualifier names avoiding redundant scopes.
Diffstat (limited to 'csharp/src/Ice/StringUtil.cs')
-rw-r--r--csharp/src/Ice/StringUtil.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/csharp/src/Ice/StringUtil.cs b/csharp/src/Ice/StringUtil.cs
index d2e90bd9a52..e5669c2ed2c 100644
--- a/csharp/src/Ice/StringUtil.cs
+++ b/csharp/src/Ice/StringUtil.cs
@@ -67,7 +67,7 @@ namespace IceUtilInternal
for(int i = start; i < len; i++)
{
char ch = str[i];
- if(match.IndexOf((char) ch) == -1)
+ if(match.IndexOf(ch) == -1)
{
return i;
}
@@ -249,13 +249,13 @@ namespace IceUtilInternal
for(int i = 0; i < s.Length; i++)
{
char c = s[i];
- if(toStringMode == Ice.ToStringMode.Unicode || !System.Char.IsSurrogate(c))
+ if(toStringMode == Ice.ToStringMode.Unicode || !char.IsSurrogate(c))
{
encodeChar(c, result, special, toStringMode);
}
else
{
- Debug.Assert(toStringMode == Ice.ToStringMode.ASCII && System.Char.IsSurrogate(c));
+ Debug.Assert(toStringMode == Ice.ToStringMode.ASCII && char.IsSurrogate(c));
if(i + 1 == s.Length)
{
throw new System.ArgumentException("High surrogate without low surrogate");
@@ -263,7 +263,7 @@ namespace IceUtilInternal
else
{
i++;
- int codePoint = System.Char.ConvertToUtf32(c, s[i]);
+ int codePoint = char.ConvertToUtf32(c, s[i]);
// append \Unnnnnnnn
result.Append("\\U");
string hex = System.Convert.ToString(codePoint, 16);
@@ -424,7 +424,7 @@ namespace IceUtilInternal
}
else
{
- result.Append(System.Char.ConvertFromUtf32(codePoint));
+ result.Append(char.ConvertFromUtf32(codePoint));
}
break;
}
@@ -520,7 +520,7 @@ namespace IceUtilInternal
}
default:
{
- if(System.String.IsNullOrEmpty(special) || special.IndexOf(c) == -1)
+ if(string.IsNullOrEmpty(special) || special.IndexOf(c) == -1)
{
result.Append('\\'); // not in special, so we keep the backslash
}
@@ -720,14 +720,13 @@ namespace IceUtilInternal
return true;
}
- private class OrdinalStringComparerImpl : System.Collections.Generic.IComparer<string>
+ private class OrdinalStringComparerImpl : IComparer<string>
{
public int Compare(string l, string r)
{
return string.CompareOrdinal(l, r);
}
}
- public static System.Collections.Generic.IComparer<string> OrdinalStringComparer =
- new OrdinalStringComparerImpl();
+ public static IComparer<string> OrdinalStringComparer = new OrdinalStringComparerImpl();
}
}