Пример #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;
            }
        }
Пример #2
0
        public Command GetNextAsCommand(Action <string> errorCallback)
        {
            Command command = GetNextAsCommand();

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

            return(command);
        }
Пример #3
0
        public bool TryGetNextAsCommand(out Command command)
        {
            command = GetNextAsCommand();

            return(!(command is null));
        }