コード例 #1
0
        public List <Model.PathAction> GetKeyboardPath(string searchTerm, string keyboardType)
        {
            List <Model.PathAction> pathActions = new List <Model.PathAction>();

            KeyboardType type;

            if (Enum.TryParse(keyboardType, out type))
            {
                Model.Keyboard keyboard = _keyboards.GetKeyboard(type);

                PathEngine engine = new PathEngine(searchTerm, keyboard);
                return(engine.GeneratePath());
            }
            else
            {
                throw new InvalidKeyboardTypeException($"{keyboardType} is not a valid keyboard type.");
            }
        }