22 lines
379 B
C#
22 lines
379 B
C#
|
|
using System;
|
||
|
|
|
||
|
|
public class GreetCommand : ICommand
|
||
|
|
{
|
||
|
|
public string Name => "greet";
|
||
|
|
public string Description => "greets someone.. args [name]";
|
||
|
|
|
||
|
|
public void Execute(string[] args)
|
||
|
|
{
|
||
|
|
|
||
|
|
if (args.Length == 0)
|
||
|
|
{
|
||
|
|
|
||
|
|
Console.WriteLine(Description);
|
||
|
|
return;
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
Console.WriteLine("Greetings , " + args[0]);
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|