mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 12:30:32 +00:00
39 lines
850 B
C#
39 lines
850 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Cosmos.Shell.Console.Commands
|
|
{
|
|
public class ExitCommand : CommandBase
|
|
{
|
|
public override string Name
|
|
{
|
|
get { return "exit"; }
|
|
}
|
|
|
|
public override string Summary
|
|
{
|
|
get { return "Closes the console."; }
|
|
}
|
|
|
|
public delegate void SimpleDelegate();
|
|
|
|
private SimpleDelegate _exit;
|
|
|
|
public ExitCommand(SimpleDelegate exit)
|
|
{
|
|
_exit = exit;
|
|
}
|
|
|
|
public override void Execute(string param)
|
|
{
|
|
_exit();
|
|
}
|
|
|
|
public override void Help()
|
|
{
|
|
System.Console.WriteLine("exit");
|
|
System.Console.WriteLine(" Closes the console.");
|
|
}
|
|
}
|
|
}
|