Ejemplo n.º 1
0
        public CommandEditorDialog([NotNull] Command command) : base(command)
        {
            _command = command;

            var ext = command.GetModExtension <CommandExtension>();

            if (ext?.SettingsHandler != null)
            {
                _settings = Activator.CreateInstance(ext.SettingsHandler) as ICommandSettings;
            }
        }
Ejemplo n.º 2
0
        public Command GetNextAsCommand(Action <string> errorCallback)
        {
            Command command = GetNextAsCommand();

            if (command == null)
            {
                errorCallback.Invoke(_lastArgument);
            }

            return(command);
        }
Ejemplo n.º 3
0
        public bool TryGetNextAsCommand(out Command command)
        {
            command = GetNextAsCommand();

            return(!(command is null));
        }