private int Execute(CommandTree leaf, CommandTree tree, ILookup <string, string> remaining, ITypeResolver resolver) { // Create the command and the settings. var settings = leaf.CreateSettings(resolver); // Bind the command tree against the settings. _binder.Bind(tree, ref settings, resolver); // Execute the command. var command = leaf.CreateCommand(resolver); return(command.Execute(settings, remaining)); }