/// <summary> /// Creates a new instance with a specified command handler and prompt string /// </summary> /// <param name="cmdHandler"></param> /// <param name="prompt"></param> public CmdWatcher(ICmdCommandHandler cmdHandler, string prompt = null) { if (cmdHandler == null) { throw new ArgumentNullException("CmdCommandHandler cannot be null!"); } this.CmdHandler = cmdHandler; this.Prompt = prompt ?? DefaultPrompt; }
/// <summary> /// Creates a new instance with a specified command handler /// </summary> /// <param name="cmdHandler"></param> public CmdWatcher(ICmdCommandHandler cmdHandler) : this(cmdHandler, DefaultPrompt) { }