Replaces types with built-in types.
This commit is contained in:
parent
fee83ce560
commit
22ab83ea9e
98 changed files with 248 additions and 248 deletions
|
|
@ -686,10 +686,10 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
private static Type[] m_SignedNumerics = {
|
||||
typeof( Int64 ),
|
||||
typeof( Int32 ),
|
||||
typeof( Int16 ),
|
||||
typeof( SByte )
|
||||
typeof( long ),
|
||||
typeof( int ),
|
||||
typeof( short ),
|
||||
typeof( sbyte )
|
||||
};
|
||||
|
||||
public static bool IsSignedNumeric( Type type )
|
||||
|
|
@ -702,10 +702,10 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
private static Type[] m_UnsignedNumerics = {
|
||||
typeof( UInt64 ),
|
||||
typeof( UInt32 ),
|
||||
typeof( UInt16 ),
|
||||
typeof( Byte )
|
||||
typeof( ulong ),
|
||||
typeof( uint ),
|
||||
typeof( ushort ),
|
||||
typeof( byte )
|
||||
};
|
||||
|
||||
public static bool IsUnsignedNumeric( Type type )
|
||||
|
|
|
|||
|
|
@ -207,11 +207,11 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
int index = 0;
|
||||
string file = String.Concat( name, ext );
|
||||
string file = string.Concat( name, ext );
|
||||
|
||||
while( File.Exists( Path.Combine( root, file ) ) )
|
||||
{
|
||||
file = String.Concat( name, ++index, ext );
|
||||
file = string.Concat( name, ++index, ext );
|
||||
}
|
||||
|
||||
return file;
|
||||
|
|
@ -370,7 +370,7 @@ namespace Server.Commands
|
|||
aliased = realType.Name;
|
||||
}
|
||||
|
||||
string retval = String.Concat( prepend, aliased, append, name );
|
||||
string retval = string.Concat( prepend, aliased, append, name );
|
||||
//Console.WriteLine(">> getpair: "+retval);
|
||||
return retval;
|
||||
}
|
||||
|
|
@ -1947,16 +1947,16 @@ namespace Server.Commands
|
|||
private const string HtmlNewLine = " ";
|
||||
|
||||
private static object[,] m_Tooltips = {
|
||||
{ typeof( Byte ), "Numeric value in the range from 0 to 255, inclusive." },
|
||||
{ typeof( SByte ), "Numeric value in the range from negative 128 to positive 127, inclusive." },
|
||||
{ typeof( UInt16 ), "Numeric value in the range from 0 to 65,535, inclusive." },
|
||||
{ typeof( Int16 ), "Numeric value in the range from negative 32,768 to positive 32,767, inclusive." },
|
||||
{ typeof( UInt32 ), "Numeric value in the range from 0 to 4,294,967,295, inclusive." },
|
||||
{ typeof( Int32 ), "Numeric value in the range from negative 2,147,483,648 to positive 2,147,483,647, inclusive." },
|
||||
{ typeof( UInt64 ), "Numeric value in the range from 0 through about 10^20." },
|
||||
{ typeof( Int64 ), "Numeric value in the approximate range from negative 10^19 through 10^19." },
|
||||
{ typeof( String ), "Text value. To specify a value containing spaces, encapsulate the value in quote characters:{0}{0}"Spaced text example"" },
|
||||
{ typeof( Boolean ), "Boolean value which can be either True or False." },
|
||||
{ typeof( byte ), "Numeric value in the range from 0 to 255, inclusive." },
|
||||
{ typeof( sbyte ), "Numeric value in the range from negative 128 to positive 127, inclusive." },
|
||||
{ typeof( ushort ), "Numeric value in the range from 0 to 65,535, inclusive." },
|
||||
{ typeof( short ), "Numeric value in the range from negative 32,768 to positive 32,767, inclusive." },
|
||||
{ typeof( uint ), "Numeric value in the range from 0 to 4,294,967,295, inclusive." },
|
||||
{ typeof( int ), "Numeric value in the range from negative 2,147,483,648 to positive 2,147,483,647, inclusive." },
|
||||
{ typeof( ulong ), "Numeric value in the range from 0 through about 10^20." },
|
||||
{ typeof( long ), "Numeric value in the approximate range from negative 10^19 through 10^19." },
|
||||
{ typeof( string ), "Text value. To specify a value containing spaces, encapsulate the value in quote characters:{0}{0}"Spaced text example"" },
|
||||
{ typeof( bool ), "Boolean value which can be either True or False." },
|
||||
{ typeof( Map ), "Map or facet name. Possible values include:{0}{0}- Felucca{0}- Trammel{0}- Ilshenar{0}- Malas" },
|
||||
{ typeof( Poison ), "Poison name or level. Possible values include:{0}{0}- Lesser{0}- Regular{0}- Greater{0}- Deadly{0}- Lethal" },
|
||||
{ typeof( Point3D ), "Three-dimensional coordinate value. Format as follows:{0}{0}"(<x value>, <y value>, <z value>)"" }
|
||||
|
|
@ -1971,7 +1971,7 @@ namespace Server.Commands
|
|||
Type checkType = (Type)m_Tooltips[i, 0];
|
||||
|
||||
if ( paramType == checkType )
|
||||
return String.Format( (string)m_Tooltips[i, 1], HtmlNewLine );
|
||||
return string.Format( (string)m_Tooltips[i, 1], HtmlNewLine );
|
||||
}
|
||||
|
||||
if ( paramType.IsEnum )
|
||||
|
|
@ -2508,7 +2508,7 @@ namespace Server.Commands
|
|||
{
|
||||
// MONO: type.Namespace is null/empty for generic arguments
|
||||
|
||||
if ( type.Name == "T" || String.IsNullOrEmpty( type.Namespace ) || m_Namespaces == null )
|
||||
if ( type.Name == "T" || string.IsNullOrEmpty( type.Namespace ) || m_Namespaces == null )
|
||||
return true;
|
||||
|
||||
if ( type.Namespace.StartsWith( "Server" ) )
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ namespace Server.Commands
|
|||
|
||||
for ( index = 0; index < input.Length; ++index )
|
||||
{
|
||||
if ( Char.IsLetter( input, index ) )
|
||||
if ( char.IsLetter( input, index ) )
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ namespace Server.Commands.Generic
|
|||
|
||||
if ( m_IgnoreCase || methodName == "Equals" )
|
||||
{
|
||||
Type type = ( m_IgnoreCase ? typeof( Insensitive ) : typeof( String ) );
|
||||
Type type = ( m_IgnoreCase ? typeof( Insensitive ) : typeof( string ) );
|
||||
|
||||
emitter.BeginCall(
|
||||
type.GetMethod(
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Server.Commands
|
|||
if ( !m_Enabled )
|
||||
return;
|
||||
|
||||
WriteLine( from, String.Format( format, args ) );
|
||||
WriteLine( from, string.Format( format, args ) );
|
||||
}
|
||||
|
||||
public static void WriteLine( Mobile from, string text )
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ namespace Server.Commands
|
|||
{
|
||||
ArrayList types = new ArrayList();
|
||||
|
||||
using ( BinaryReader bin = new BinaryReader( new FileStream( String.Format( "Saves/{0}/{0}.tdb", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) )
|
||||
using ( BinaryReader bin = new BinaryReader( new FileStream( string.Format( "Saves/{0}/{0}.tdb", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) )
|
||||
{
|
||||
int count = bin.ReadInt32();
|
||||
|
||||
|
|
@ -346,7 +346,7 @@ namespace Server.Commands
|
|||
|
||||
Hashtable table = new Hashtable();
|
||||
|
||||
using ( BinaryReader bin = new BinaryReader( new FileStream( String.Format( "Saves/{0}/{0}.idx", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) )
|
||||
using ( BinaryReader bin = new BinaryReader( new FileStream( string.Format( "Saves/{0}/{0}.idx", type ), FileMode.Open, FileAccess.Read, FileShare.Read ) ) )
|
||||
{
|
||||
int count = bin.ReadInt32();
|
||||
|
||||
|
|
|
|||
|
|
@ -309,9 +309,9 @@ namespace Server.Commands
|
|||
if ( value == null )
|
||||
toString = "null";
|
||||
else if ( IsNumeric( type ) )
|
||||
toString = String.Format( "{0} (0x{0:X})", value );
|
||||
toString = string.Format( "{0} (0x{0:X})", value );
|
||||
else if ( IsChar( type ) )
|
||||
toString = String.Format( "'{0}' ({1} [0x{1:X}])", value, (int) value );
|
||||
toString = string.Format( "'{0}' ({1} [0x{1:X}])", value, (int) value );
|
||||
else if ( IsString( type ) )
|
||||
toString = ( (string) value == "null" ? @"@""null""" : $"\"{value}\"");
|
||||
else if ( IsText( type ) )
|
||||
|
|
@ -332,7 +332,7 @@ namespace Server.Commands
|
|||
|
||||
concat[concat.Length-1] = toString;
|
||||
|
||||
return String.Concat( concat );
|
||||
return string.Concat( concat );
|
||||
}
|
||||
|
||||
public static string SetValue( Mobile from, object o, string name, string value )
|
||||
|
|
@ -362,14 +362,14 @@ namespace Server.Commands
|
|||
return ( t == typeofType );
|
||||
}
|
||||
|
||||
private static Type typeofChar = typeof( Char );
|
||||
private static Type typeofChar = typeof( char );
|
||||
|
||||
private static bool IsChar( Type t )
|
||||
{
|
||||
return ( t == typeofChar );
|
||||
}
|
||||
|
||||
private static Type typeofString = typeof( String );
|
||||
private static Type typeofString = typeof( string );
|
||||
|
||||
private static bool IsString( Type t )
|
||||
{
|
||||
|
|
@ -409,10 +409,10 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
private static Type[] m_NumericTypes = {
|
||||
typeof( Byte ), typeof( SByte ),
|
||||
typeof( Int16 ), typeof( UInt16 ),
|
||||
typeof( Int32 ), typeof( UInt32 ),
|
||||
typeof( Int64 ), typeof( UInt64 )
|
||||
typeof( byte ), typeof( sbyte ),
|
||||
typeof( short ), typeof( ushort ),
|
||||
typeof( int ), typeof( uint ),
|
||||
typeof( long ), typeof( ulong )
|
||||
};
|
||||
|
||||
private static bool IsNumeric( Type t )
|
||||
|
|
@ -495,7 +495,7 @@ namespace Server.Commands
|
|||
}
|
||||
|
||||
if ( isSerial ) // mutate back
|
||||
toSet = (Serial)((Int32)toSet);
|
||||
toSet = (Serial)((int)toSet);
|
||||
|
||||
constructed = toSet;
|
||||
return null;
|
||||
|
|
@ -598,7 +598,7 @@ namespace Server
|
|||
public sealed class NotYetBoundException : BindingException
|
||||
{
|
||||
public NotYetBoundException( Property property )
|
||||
: base( property, String.Format( "Property has not yet been bound." ) )
|
||||
: base( property, string.Format( "Property has not yet been bound." ) )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
@ -606,7 +606,7 @@ namespace Server
|
|||
public sealed class AlreadyBoundException : BindingException
|
||||
{
|
||||
public AlreadyBoundException( Property property )
|
||||
: base( property, String.Format( "Property has already been bound." ) )
|
||||
: base( property, string.Format( "Property has already been bound." ) )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Server
|
|||
|
||||
public static void SendWarning( Mobile m, string header, string baseWarning, Map map, Point3D start, Point3D end, WarningGumpCallback callback )
|
||||
{
|
||||
m.SendGump( new WarningGump( 1060635, 30720, String.Format( baseWarning, String.Format( header, map ) ), 0xFFC000, 420, 400, callback, new StateInfo( map, start, end ) ) );
|
||||
m.SendGump( new WarningGump( 1060635, 30720, string.Format( baseWarning, string.Format( header, map ) ), 0xFFC000, 420, 400, callback, new StateInfo( map, start, end ) ) );
|
||||
}
|
||||
|
||||
private const string BaseFreezeWarning = "{0} " +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue