using KssSmaPlaLib.AutoTest.Command.Definition; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace KssSmaPlaLib.AutoTest.Command.Translator { public static class CommandTranslatorUxer { private static readonly Dictionary _reverseMap = new Dictionary() { { "寝る", CommandEnumUxer.Command.Sleep }, { "あああをセット", CommandEnumUxer.Command.SetText }, { "ボタン押す", CommandEnumUxer.Command.PushButton }, { "もしもしDB", CommandEnumUxer.Command.TryDbMoshimoshi } }; public static bool TryTranslate(string userCommand, out CommandEnumUxer.Command command) => _reverseMap.TryGetValue(userCommand, out command); } }