Use expression body syntax
This commit is contained in:
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class CheckConditionalTraitInterfaceOverrides : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--check-conditional-trait-interface-overrides"; } }
|
||||
string IUtilityCommand.Name => "--check-conditional-trait-interface-overrides";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class CheckExplicitInterfacesCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--check-explicit-interfaces"; } }
|
||||
string IUtilityCommand.Name => "--check-explicit-interfaces";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class CheckMissingSprites : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--check-missing-sprites"; } }
|
||||
string IUtilityCommand.Name => "--check-missing-sprites";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class CheckYaml : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--check-yaml"; } }
|
||||
string IUtilityCommand.Name => "--check-yaml";
|
||||
|
||||
static int errors = 0;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ConvertSpriteToPngCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--png"; } }
|
||||
string IUtilityCommand.Name => "--png";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class CreateManPage : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--man-page"; } }
|
||||
string IUtilityCommand.Name => "--man-page";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class DebugChromeRegions : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--debug-chrome-regions"; } }
|
||||
string IUtilityCommand.Name => "--debug-chrome-regions";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
static readonly int[] ChannelMasks = { 2, 1, 0, 3 };
|
||||
|
||||
string IUtilityCommand.Name { get { return "--dump-sequence-sheets"; } }
|
||||
string IUtilityCommand.Name => "--dump-sequence-sheets";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ExtractFilesCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--extract"; } }
|
||||
string IUtilityCommand.Name => "--extract";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ExtractLuaDocsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--lua-docs"; } }
|
||||
string IUtilityCommand.Name => "--lua-docs";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class ExtractMapRules : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--map-rules"; } }
|
||||
string IUtilityCommand.Name => "--map-rules";
|
||||
bool IUtilityCommand.ValidateArguments(string[] args) { return args.Length == 2; }
|
||||
|
||||
void MergeAndPrint(Map map, string key, MiniYaml value)
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ExtractSettingsDocsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--settings-docs"; } }
|
||||
string IUtilityCommand.Name => "--settings-docs";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ExtractTraitDocsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--docs"; } }
|
||||
string IUtilityCommand.Name => "--docs";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ExtractWeaponDocsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--weapon-docs"; } }
|
||||
string IUtilityCommand.Name => "--weapon-docs";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
// See https://studio.zerobrane.com/doc-api-auto-complete for reference
|
||||
class ExtractZeroBraneStudioLuaAPI : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--zbstudio-lua-api"; } }
|
||||
string IUtilityCommand.Name => "--zbstudio-lua-api";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class GetMapHashCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--map-hash"; } }
|
||||
string IUtilityCommand.Name => "--map-hash";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ListInstallShieldCabContentsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--list-installshield-cab"; } }
|
||||
string IUtilityCommand.Name => "--list-installshield-cab";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ListInstallShieldContents : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--list-installshield"; } }
|
||||
string IUtilityCommand.Name => "--list-installshield";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ListMSCabContentsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--list-mscab"; } }
|
||||
string IUtilityCommand.Name => "--list-mscab";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class OutputResolvedRulesCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--resolved-rules"; } }
|
||||
string IUtilityCommand.Name => "--resolved-rules";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class OutputResolvedSequencesCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--resolved-sequences"; } }
|
||||
string IUtilityCommand.Name => "--resolved-sequences";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class OutputResolvedWeaponsCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--resolved-weapons"; } }
|
||||
string IUtilityCommand.Name => "--resolved-weapons";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class PngSheetExportMetadataCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--png-sheet-export"; } }
|
||||
string IUtilityCommand.Name => "--png-sheet-export";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class PngSheetImportMetadataCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--png-sheet-import"; } }
|
||||
string IUtilityCommand.Name => "--png-sheet-import";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class RefreshMapCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--refresh-map"; } }
|
||||
string IUtilityCommand.Name => "--refresh-map";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class ReplayMetadataCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--replay-metadata"; } }
|
||||
string IUtilityCommand.Name => "--replay-metadata";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
public class ResizeMapCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--resize-map"; } }
|
||||
string IUtilityCommand.Name => "--resize-map";
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
class Rgba2Hex : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--rgba2hex"; } }
|
||||
string IUtilityCommand.Name => "--rgba2hex";
|
||||
|
||||
static readonly char[] Comma = new char[] { ',' };
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
|
||||
class Argb2Hex : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--argb2hex"; } }
|
||||
string IUtilityCommand.Name => "--argb2hex";
|
||||
|
||||
static readonly char[] Comma = new char[] { ',' };
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
|
||||
class UpdateMapCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--update-map"; } }
|
||||
string IUtilityCommand.Name => "--update-map";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
|
||||
class UpdateModCommand : IUtilityCommand
|
||||
{
|
||||
string IUtilityCommand.Name { get { return "--update-mod"; } }
|
||||
string IUtilityCommand.Name => "--update-mod";
|
||||
|
||||
bool IUtilityCommand.ValidateArguments(string[] args) { return true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user