Example #1
0
        // Lookup a command with a partial matching name.
        public ICommand LookupBestMatch(string a_commandName)
        {
            ICommand command = null;

            KTrie.ILookupQuery query = _prefixTree.LookupBestMatch(a_commandName.ToLowerInvariant());

            if (query.IsValid)
            {
                command = _registeredCommands[query.ID];
            }

            return(command);
        }
Example #2
0
        // Lookup a command with an exact matching name.
        public ICommand LookupExactMatch(string a_commandName)
        {
            ICommand command = null;

            KTrie.ILookupQuery query = _prefixTree.LookupExactMatch(a_commandName.ToLowerInvariant());

            if (query.IsValid) // Was a Command found within the Prefix Tree
            {
                command = _registeredCommands[query.ID];
            }

            return(command);
        }