diff --git a/src/Features/Console/Application/Commands/ClearCommand.cs b/src/Features/Console/Application/Commands/ClearCommand.cs index a2d065a..c8f228d 100644 --- a/src/Features/Console/Application/Commands/ClearCommand.cs +++ b/src/Features/Console/Application/Commands/ClearCommand.cs @@ -7,7 +7,7 @@ public sealed class ClearCommand : ICommand { public string Name => "clear"; public string Description => "Clears the console output."; - public IReadOnlyList Args { get; } = new CommandArgsBuilder().Build(); + public IReadOnlyList Args { get; } = []; public CommandResult Execute(CommandArgValues args) => CommandResult.Ok(clearOutput: true); } diff --git a/src/Features/Console/Application/Commands/HelpCommand.cs b/src/Features/Console/Application/Commands/HelpCommand.cs index 3bf9a24..4cc8c8b 100644 --- a/src/Features/Console/Application/Commands/HelpCommand.cs +++ b/src/Features/Console/Application/Commands/HelpCommand.cs @@ -9,7 +9,7 @@ public sealed class HelpCommand(ICommandRegistry registry) : ICommand { public string Name => "help"; public string Description => "Lists all available commands."; - public IReadOnlyList Args { get; } = new CommandArgsBuilder().Build(); + public IReadOnlyList Args { get; } = []; private static string FormatUsage(ICommand command) { diff --git a/src/Features/Console/Contracts/CommandArgSpec.cs b/src/Features/Console/Contracts/CommandArgSpec.cs index 9d92b22..c2315ac 100644 --- a/src/Features/Console/Contracts/CommandArgSpec.cs +++ b/src/Features/Console/Contracts/CommandArgSpec.cs @@ -2,6 +2,15 @@ using System.Collections.Generic; namespace Game.Features.Console.Contracts; +public enum CommandArgType +{ + String, + Int, + Float, + Bool, + Choice +} + public sealed record CommandArgSpec(string Name, CommandArgType Type, IReadOnlyList Choices = null) { public override string ToString() => diff --git a/src/Features/Console/Contracts/CommandArgType.cs b/src/Features/Console/Contracts/CommandArgType.cs deleted file mode 100644 index a8229d9..0000000 --- a/src/Features/Console/Contracts/CommandArgType.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Game.Features.Console.Contracts; - -public enum CommandArgType -{ - String, - Int, - Float, - Bool, - Choice -} diff --git a/src/Features/Console/Contracts/CommandArgType.cs.uid b/src/Features/Console/Contracts/CommandArgType.cs.uid deleted file mode 100644 index 41ef40b..0000000 --- a/src/Features/Console/Contracts/CommandArgType.cs.uid +++ /dev/null @@ -1 +0,0 @@ -uid://dnt7hwlwqtdyq