Exemplo n.º 1
0
        // internals
        //internal string UnresolvedCommandName { get; }
        internal void SetDefinition(string definition, CommandManager cmdManager)
        {
            _definition = definition;

            ReferencedCommand = cmdManager.FindCommand(definition);
            ResolvedCommand = ReferencedCommand;
        }
Exemplo n.º 2
0
        // internals
        //internal string UnresolvedCommandName { get; }
        internal void SetDefinition(string definition, CommandManager cmdManager)
        {
            _definition = definition;

            //only set referenced command if found
            //aliases only cause errors when they are used, not at instanciation
            CommandInfo refInfo = null;
            try
            {
                refInfo = cmdManager.FindCommand(definition);
            }
            catch (CommandNotFoundException)
            {
            }

            ReferencedCommand = refInfo;
            ResolvedCommand = ReferencedCommand;
        }