コード例 #1
0
ファイル: ReadLine.cs プロジェクト: davetapley/PSReadLine
        private static void Chord(ConsoleKeyInfo?key = null, object arg = null)
        {
            if (!key.HasValue)
            {
                throw new ArgumentNullException(nameof(key));
            }

            if (_singleton._chordDispatchTable.TryGetValue(PSKeyInfo.FromConsoleKeyInfo(key.Value), out var secondKeyDispatchTable))
            {
                var secondKey = ReadKey();
                _singleton.ProcessOneKey(secondKey, secondKeyDispatchTable, ignoreIfNoAction: true, arg: arg);
            }
        }
コード例 #2
0
ファイル: ReadLine.cs プロジェクト: KevinGulu/PSReadLine
        private static void Chord(ConsoleKeyInfo?key = null, object arg = null)
        {
            if (!key.HasValue)
            {
                throw new ArgumentNullException("key");
            }

            Dictionary <ConsoleKeyInfo, KeyHandler> secondKeyDispatchTable;

            if (_singleton._chordDispatchTable.TryGetValue(key.Value, out secondKeyDispatchTable))
            {
                var secondKey = ReadKey();
                _singleton.ProcessOneKey(secondKey, secondKeyDispatchTable, ignoreIfNoAction: true, arg: arg);
            }
        }