|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using uREPL;
- using RobocraftX.CommandLine.Custom;
-
- namespace ExtraCommands
- {
- static class CustomCommandUtility
- {
- public static void Register(string name, Action action, string desc)
- {
- RuntimeCommands.Register(name, action, desc);
- ConsoleCommands.Register(name, action, desc);
- }
-
- public static void Register(string name, Action<object> action, string desc)
- {
- RuntimeCommands.Register<object>(name, action, desc);
- }
-
- public static void Register<Param0>(string name, Action<Param0> action, string desc)
- {
- RuntimeCommands.Register<Param0>(name, action, desc);
- ConsoleCommands.Register<Param0>(name, action, desc);
- }
-
- public static void Register<Param0, Param1>(string name, Action<Param0, Param1> action, string desc)
- {
- RuntimeCommands.Register<Param0, Param1>(name, action, desc);
- ConsoleCommands.Register<Param0, Param1>(name, action, desc);
- }
-
- public static void Register(string name, Action<object, object, object> action, string desc)
- {
- RuntimeCommands.Register<object, object, object>(name, action, desc);
- ConsoleCommands.Register<object, object, object>(name, action, desc);
- }
-
- public static void Register<Param0, Param1, Param2>(string name, Action<Param0, Param1, Param2> action, string desc)
- {
- RuntimeCommands.Register<Param0, Param1, Param2>(name, action, desc);
- ConsoleCommands.Register<Param0, Param1, Param2>(name, action, desc);
- }
-
- public static void Unregister(string name)
- {
- RuntimeCommands.Unregister(name);
- ConsoleCommands.Unregister(name);
- }
- }
- }
|