Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -24,13 +24,11 @@ namespace Server
{
public static class Insensitive
{
private static IComparer m_Comparer = CaseInsensitiveComparer.Default;
public static IComparer Comparer => m_Comparer;
public static IComparer Comparer { get; } = CaseInsensitiveComparer.Default;
public static int Compare( string a, string b )
{
return m_Comparer.Compare( a, b );
return Comparer.Compare( a, b );
}
public static bool Equals( string a, string b )
@ -40,7 +38,7 @@ namespace Server
if ( a == null || b == null || a.Length != b.Length )
return false;
return ( m_Comparer.Compare( a, b ) == 0 );
return ( Comparer.Compare( a, b ) == 0 );
}
public static bool StartsWith( string a, string b )
@ -48,7 +46,7 @@ namespace Server
if ( a == null || b == null || a.Length < b.Length )
return false;
return ( m_Comparer.Compare( a.Substring( 0, b.Length ), b ) == 0 );
return ( Comparer.Compare( a.Substring( 0, b.Length ), b ) == 0 );
}
public static bool EndsWith( string a, string b )
@ -56,7 +54,7 @@ namespace Server
if ( a == null || b == null || a.Length < b.Length )
return false;
return ( m_Comparer.Compare( a.Substring( a.Length - b.Length ), b ) == 0 );
return ( Comparer.Compare( a.Substring( a.Length - b.Length ), b ) == 0 );
}
public static bool Contains( string a, string b )