using Quadarax.Foundation.Common.Value;
using Quadarax.Foundation.QConsole.Attributes;
using Quadarax.Foundation.QConsole.Command.Base;

namespace Quadarax.Foundation.QConsole.Command.Defaults
{
    [CommandDefinition]
    public class CmdExit : AbstractCommand
    {
        #region *** Properties ***
        public override string Name => Constants.Commands.Exit.Name;
        public override string Description => Constants.Commands.Exit.Description;
        #endregion

        #region *** Constructors ***
        public CmdExit(Engine engine) : base(engine)
        {
        }
        #endregion
       
        #region *** Protected overrides ***
        protected override Result OnExecute()
        {
            Engine.Stop();
            return new Result();
        }
        #endregion
    }
}
