Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Dictionary<String, Macro> listMacros()
- {
- Dictionary<String, Macro> returned = new Dictionary<string,Macro>();
- Type instance = this.GetType();
- MethodInfo[] methods = instance.GetMethods();
- foreach (MethodInfo methodInfo in methods)
- {
- if (!methodInfo.IsPublic || methodInfo.IsAbstract || !methodInfo.IsStatic) { continue; }
- Macro newMacro = new Macro();
- newMacro.name = methodInfo.Name.ToLower();
- newMacro.funcType = '$';
- newMacro.ClassType = this.GetType();
- newMacro.function = methodInfo.Name;
- newMacro.method = methodInfo;
- returned.Add("$" + methodInfo.Name, newMacro);
- }
- return returned;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement