diff --git a/Scripts/Accounting/AccountHandler.cs b/Scripts/Accounting/AccountHandler.cs
index 97f6dc28f..0e47e05cd 100644
--- a/Scripts/Accounting/AccountHandler.cs
+++ b/Scripts/Accounting/AccountHandler.cs
@@ -34,7 +34,7 @@ namespace Server.Misc
set => m_LockdownLevel = value;
}
- private static CityInfo[] StartingCities = new CityInfo[]
+ private static CityInfo[] StartingCities = new[]
{
new CityInfo( "New Haven", "New Haven Bank", 1150168, 3667, 2625, 0 ),
new CityInfo( "Yew", "The Empath Abbey", 1075072, 633, 858, 0 ),
@@ -249,7 +249,7 @@ namespace Server.Misc
}
}
- private static readonly char[] m_ForbiddenChars = new char[]
+ private static readonly char[] m_ForbiddenChars = new[]
{
'<', '>', ':', '"', '/', '\\', '|', '?', '*'
};
diff --git a/Scripts/Commands/Add.cs b/Scripts/Commands/Add.cs
index b7fe477d0..e2e9ab524 100644
--- a/Scripts/Commands/Add.cs
+++ b/Scripts/Commands/Add.cs
@@ -673,7 +673,7 @@ namespace Server.Commands
return type.IsDefined( m_ParsableType, false );
}
- private static Type[] m_ParseTypes = new Type[]{ typeof( string ) };
+ private static Type[] m_ParseTypes = new[]{ typeof( string ) };
private static object[] m_ParseArgs = new object[1];
public static object ParseParsable( Type type, string value )
@@ -685,7 +685,7 @@ namespace Server.Commands
return method.Invoke( null, m_ParseArgs );
}
- private static Type[] m_SignedNumerics = new Type[]
+ private static Type[] m_SignedNumerics = new[]
{
typeof( Int64 ),
typeof( Int32 ),
@@ -702,7 +702,7 @@ namespace Server.Commands
return false;
}
- private static Type[] m_UnsignedNumerics = new Type[]
+ private static Type[] m_UnsignedNumerics = new[]
{
typeof( UInt64 ),
typeof( UInt32 ),
diff --git a/Scripts/Commands/Batch.cs b/Scripts/Commands/Batch.cs
index 5fa9ff596..d4b5ae83a 100644
--- a/Scripts/Commands/Batch.cs
+++ b/Scripts/Commands/Batch.cs
@@ -29,7 +29,7 @@ namespace Server.Commands
public Batch()
{
- Commands = new string[]{ "Batch" };
+ Commands = new[]{ "Batch" };
ListOptimized = true;
m_BatchCommands = new ArrayList();
diff --git a/Scripts/Commands/Docs.cs b/Scripts/Commands/Docs.cs
index a171a672a..61e994706 100644
--- a/Scripts/Commands/Docs.cs
+++ b/Scripts/Commands/Docs.cs
@@ -248,7 +248,7 @@ namespace Server.Commands
#region GetPair
- private static string[,] m_Aliases = new string[,]
+ private static string[,] m_Aliases = new[,]
{
{ "System.Object", "object" },
{ "System.String", "string" },
diff --git a/Scripts/Commands/GenCategorization.cs b/Scripts/Commands/GenCategorization.cs
index 7740f03d7..a9fdeb555 100644
--- a/Scripts/Commands/GenCategorization.cs
+++ b/Scripts/Commands/GenCategorization.cs
@@ -42,7 +42,7 @@ namespace Server.Commands
[Description( "Rebuilds the categorization data file used by the Add command." )]
public static void RebuildCategorization_OnCommand( CommandEventArgs e )
{
- CategoryEntry root = new CategoryEntry( null, "Add Menu", new CategoryEntry[]{ Items, Mobiles } );
+ CategoryEntry root = new CategoryEntry( null, "Add Menu", new[]{ Items, Mobiles } );
Export( root, "Data/objects.xml", "Objects" );
diff --git a/Scripts/Commands/Generic/Commands/Commands.cs b/Scripts/Commands/Generic/Commands/Commands.cs
index 445aaa7fb..bc6b562cc 100644
--- a/Scripts/Commands/Generic/Commands/Commands.cs
+++ b/Scripts/Commands/Generic/Commands/Commands.cs
@@ -84,7 +84,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Simple | CommandSupport.Complex | CommandSupport.Self;
- Commands = new string[]{ "Condition" };
+ Commands = new[]{ "Condition" };
ObjectTypes = ObjectTypes.All;
Usage = "Condition ";
Description = "Checks that the given condition matches a targeted object.";
@@ -119,7 +119,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllItems;
- Commands = new string[]{ "BringToPack" };
+ Commands = new[]{ "BringToPack" };
ObjectTypes = ObjectTypes.Items;
Usage = "BringToPack";
Description = "Brings a targeted item to your backpack.";
@@ -143,7 +143,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Simple;
- Commands = new string[]{ "RefreshHouse" };
+ Commands = new[]{ "RefreshHouse" };
ObjectTypes = ObjectTypes.Items;
Usage = "RefreshHouse";
Description = "Refreshes a targeted house sign.";
@@ -178,7 +178,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Complex;
- Commands = new string[]{ "Count" };
+ Commands = new[]{ "Count" };
ObjectTypes = ObjectTypes.All;
Usage = "Count";
Description = "Counts the number of objects that a command modifier would use. Generally used with condition arguments.";
@@ -200,7 +200,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ "OpenBrowser", "OB" };
+ Commands = new[]{ "OpenBrowser", "OB" };
ObjectTypes = ObjectTypes.Mobiles;
Usage = "OpenBrowser ";
Description = "Opens the web browser of a targeted player to a specified url.";
@@ -287,7 +287,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.All;
- Commands = new string[]{ "Increase", "Inc" };
+ Commands = new[]{ "Increase", "Inc" };
ObjectTypes = ObjectTypes.Both;
Usage = "Increase { ...}";
Description = "Increases the value of a specified property by the specified offset.";
@@ -321,7 +321,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ "PrivSound" };
+ Commands = new[]{ "PrivSound" };
ObjectTypes = ObjectTypes.Mobiles;
Usage = "PrivSound ";
Description = "Plays a sound to a given target.";
@@ -360,13 +360,13 @@ namespace Server.Commands.Generic
if ( inGump )
{
- Commands = new string[]{ "Message", "Msg" };
+ Commands = new[]{ "Message", "Msg" };
Usage = "Message \"text\"";
Description = "Sends a message to a targeted player.";
}
else
{
- Commands = new string[]{ "Tell" };
+ Commands = new[]{ "Tell" };
Usage = "Tell \"text\"";
Description = "Sends a system message to a targeted player.";
}
@@ -392,7 +392,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.All;
- Commands = new string[]{ "AddToPack", "AddToCont" };
+ Commands = new[]{ "AddToPack", "AddToCont" };
ObjectTypes = ObjectTypes.Both;
ListOptimized = true;
Usage = "AddToPack [params] [set { ...}]";
@@ -432,7 +432,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Simple | CommandSupport.Self;
- Commands = new string[]{ "Add" };
+ Commands = new[]{ "Add" };
ObjectTypes = ObjectTypes.All;
Usage = "Add [ [params] [set { ...}]]";
Description = "Adds an item or npc by name to a targeted location. Optional constructor parameters. Optional set property list. If no arguments are specified, this brings up a categorized add menu.";
@@ -493,7 +493,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.Simple;
- Commands = new string[]{ "Teleport", "Tele" };
+ Commands = new[]{ "Teleport", "Tele" };
ObjectTypes = ObjectTypes.All;
Usage = "Teleport";
Description = "Teleports your character to a targeted location.";
@@ -532,7 +532,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ "Dismount" };
+ Commands = new[]{ "Dismount" };
ObjectTypes = ObjectTypes.Mobiles;
Usage = "Dismount";
Description = "Forcefully dismounts a given target.";
@@ -591,7 +591,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllNPCs;
- Commands = new string[]{ "Restock" };
+ Commands = new[]{ "Restock" };
ObjectTypes = ObjectTypes.Mobiles;
Usage = "Restock";
Description = "Manually restocks a targeted vendor, refreshing the quantity of every item the vendor sells to the maximum. This also invokes the maximum quantity adjustment algorithms.";
@@ -619,7 +619,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.All;
- Commands = new string[]{ "GetType" };
+ Commands = new[]{ "GetType" };
ObjectTypes = ObjectTypes.All;
Usage = "GetType";
Description = "Gets the type name of a targeted object.";
@@ -649,7 +649,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.All;
- Commands = new string[]{ "Get" };
+ Commands = new[]{ "Get" };
ObjectTypes = ObjectTypes.All;
Usage = "Get ";
Description = "Gets one or more property values by name of a targeted object.";
@@ -695,7 +695,7 @@ namespace Server.Commands.Generic
else
Supports = CommandSupport.All;
- Commands = new string[]{ command };
+ Commands = new[]{ command };
ObjectTypes = objects;
Usage = command;
Description = String.Format( "Sets the {0} property to {1}.", name, value );
@@ -718,7 +718,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.All;
- Commands = new string[]{ "Set" };
+ Commands = new[]{ "Set" };
ObjectTypes = ObjectTypes.Both;
Usage = "Set [...]";
Description = "Sets one or more property values by name of a targeted object.";
@@ -751,7 +751,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllNPCs | CommandSupport.AllItems;
- Commands = new string[]{ "Delete", "Remove" };
+ Commands = new[]{ "Delete", "Remove" };
ObjectTypes = ObjectTypes.Both;
Usage = "Delete";
Description = "Deletes a targeted item or mobile. Does not delete players.";
@@ -836,7 +836,7 @@ namespace Server.Commands.Generic
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.AllMobiles;
- Commands = value ? new string[]{ "Kill" } : new string[]{ "Resurrect", "Res" };
+ Commands = value ? new[]{ "Kill" } : new[]{ "Resurrect", "Res" };
ObjectTypes = ObjectTypes.Mobiles;
if ( value )
@@ -919,7 +919,7 @@ namespace Server.Commands.Generic
AccessLevel = AccessLevel.Counselor;
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ value ? "Hide" : "Unhide" };
+ Commands = new[]{ value ? "Hide" : "Unhide" };
ObjectTypes = ObjectTypes.Mobiles;
if ( value )
@@ -968,7 +968,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Administrator;
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ "Firewall" };
+ Commands = new[]{ "Firewall" };
ObjectTypes = ObjectTypes.Mobiles;
Usage = "Firewall";
Description = "Adds a targeted player to the firewall (list of blocked IP addresses). This command does not ban or kick.";
@@ -1011,7 +1011,7 @@ namespace Server.Commands.Generic
AccessLevel = ( ban ? AccessLevel.Administrator : AccessLevel.GameMaster );
Supports = CommandSupport.AllMobiles;
- Commands = new string[]{ ban ? "Ban" : "Kick" };
+ Commands = new[]{ ban ? "Ban" : "Kick" };
ObjectTypes = ObjectTypes.Mobiles;
if ( ban )
@@ -1073,7 +1073,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.Administrator;
Supports = CommandSupport.Simple;
- Commands = new string[] { "TraceLockdown" };
+ Commands = new[] { "TraceLockdown" };
ObjectTypes = ObjectTypes.Items;
Usage = "TraceLockdown";
Description = "Finds the BaseHouse for which a targeted item is locked down or secured.";
diff --git a/Scripts/Commands/Generic/Commands/DesignInsert.cs b/Scripts/Commands/Generic/Commands/DesignInsert.cs
index 38ac8f27c..304255a12 100644
--- a/Scripts/Commands/Generic/Commands/DesignInsert.cs
+++ b/Scripts/Commands/Generic/Commands/DesignInsert.cs
@@ -19,7 +19,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Single | CommandSupport.Area;
- Commands = new string[] { "DesignInsert" };
+ Commands = new[] { "DesignInsert" };
ObjectTypes = ObjectTypes.Items;
Usage = "DesignInsert [allItems=false]";
Description = "Inserts multiple targeted items into a customizable house's design.";
diff --git a/Scripts/Commands/Generic/Commands/Interface.cs b/Scripts/Commands/Generic/Commands/Interface.cs
index 87f50efad..0724a3cbc 100644
--- a/Scripts/Commands/Generic/Commands/Interface.cs
+++ b/Scripts/Commands/Generic/Commands/Interface.cs
@@ -14,7 +14,7 @@ namespace Server.Commands.Generic
{
AccessLevel = AccessLevel.GameMaster;
Supports = CommandSupport.Complex | CommandSupport.Simple;
- Commands = new string[]{ "Interface" };
+ Commands = new[]{ "Interface" };
ObjectTypes = ObjectTypes.Both;
Usage = "Interface [view ]";
Description = "Opens an interface to interact with matched objects. Generally used with condition arguments.";
diff --git a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs
index 000125aed..f4ff1fcc0 100644
--- a/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs
+++ b/Scripts/Commands/Generic/Extensions/Compilers/ConditionalCompiler.cs
@@ -120,7 +120,7 @@ namespace Server.Commands.Generic
"Parse",
BindingFlags.Public | BindingFlags.Static,
null,
- new Type[] { typeof( string ), typeof( NumberStyles ) },
+ new[] { typeof( string ), typeof( NumberStyles ) },
null
);
@@ -143,7 +143,7 @@ namespace Server.Commands.Generic
"Parse",
BindingFlags.Public | BindingFlags.Static,
null,
- new Type[] { typeof( string ) },
+ new[] { typeof( string ) },
null
);
@@ -279,7 +279,7 @@ namespace Server.Commands.Generic
methodName,
BindingFlags.Public | BindingFlags.Static,
null,
- new Type[]
+ new[]
{
typeof( string ),
typeof( string )
@@ -319,7 +319,7 @@ namespace Server.Commands.Generic
methodName,
BindingFlags.Public | BindingFlags.Instance,
null,
- new Type[]
+ new[]
{
typeof( string )
},
@@ -494,7 +494,7 @@ namespace Server.Commands.Generic
/* name */ "Verify",
/* attr */ MethodAttributes.Public | MethodAttributes.Virtual,
/* return */ typeof( bool ),
- /* params */ new Type[] { typeof( object ) } );
+ /* params */ new[] { typeof( object ) } );
LocalBuilder obj = emitter.CreateLocal( objectType );
LocalBuilder eq = emitter.CreateLocal( typeof( bool ) );
@@ -531,7 +531,7 @@ namespace Server.Commands.Generic
emitter.Method,
typeof( IConditional ).GetMethod(
"Verify",
- new Type[]
+ new[]
{
typeof( object )
}
diff --git a/Scripts/Commands/Generic/Extensions/Compilers/DistinctCompiler.cs b/Scripts/Commands/Generic/Extensions/Compilers/DistinctCompiler.cs
index 6b253efd6..225955580 100644
--- a/Scripts/Commands/Generic/Extensions/Compilers/DistinctCompiler.cs
+++ b/Scripts/Commands/Generic/Extensions/Compilers/DistinctCompiler.cs
@@ -48,7 +48,7 @@ namespace Server.Commands.Generic
/* name */ "Compare",
/* attr */ MethodAttributes.Public | MethodAttributes.Virtual,
/* return */ typeof( int ),
- /* params */ new Type[] { typeof( object ), typeof( object ) } );
+ /* params */ new[] { typeof( object ), typeof( object ) } );
LocalBuilder a = emitter.CreateLocal( objectType );
LocalBuilder b = emitter.CreateLocal( objectType );
@@ -103,7 +103,7 @@ namespace Server.Commands.Generic
emitter.Method,
typeof( IComparer ).GetMethod(
"Compare",
- new Type[]
+ new[]
{
typeof( object ),
typeof( object )
@@ -127,7 +127,7 @@ namespace Server.Commands.Generic
/* name */ "Equals",
/* attr */ MethodAttributes.Public | MethodAttributes.Virtual,
/* return */ typeof( bool ),
- /* params */ new Type[] { typeof( object ), typeof( object ) } );
+ /* params */ new[] { typeof( object ), typeof( object ) } );
emitter.Generator.Emit( OpCodes.Ldarg_0 );
emitter.Generator.Emit( OpCodes.Ldarg_1 );
@@ -145,7 +145,7 @@ namespace Server.Commands.Generic
emitter.Method,
typeof( IEqualityComparer