Exemple #1
0
 internal static CommandBinding CreateNormalBinding(
     string name           = "default",
     CommandFlags flags    = CommandFlags.None,
     NormalCommand command = null)
 {
     command = command ?? NormalCommand.NewPutAfterCaret(false);
     return(CommandBinding.NewNormalBinding(KeyNotationUtil.StringToKeyInputSet(name), flags, command));
 }
Exemple #2
0
        internal static CommandBinding CreateNormalBinding(string name, Func <CommandData, CommandResult> func)
        {
            var fsharpFunc  = func.ToFSharpFunc();
            var list        = name.Select(KeyInputUtil.CharToKeyInput).ToFSharpList();
            var commandName = KeyInputSet.NewManyKeyInputs(list);
            var command     = NormalCommand.NewPing(new PingData(fsharpFunc));

            return(CommandBinding.NewNormalBinding(commandName, CommandFlags.None, command));
        }