Files
Random-Project/TermEngine/HelpCommand.cs

27 lines
567 B
C#
Raw Normal View History

2025-07-08 04:29:21 +03:00
using System;
public class HelpCommand : ICommand
{
private readonly CommandInterpreter _interpreter;
public HelpCommand(CommandInterpreter interpreter)
{
_interpreter = interpreter;
}
public string Name => "help";
public String Description => "Shows the Help pop Up";
public void Execute(string[] args)
{
Console.WriteLine("Avaliable Commands:");
foreach (var cmd in _interpreter.GetAllCommands())
{
Console.WriteLine($"Command : {cmd.Name} | {cmd.Description}");
}
}
}