Example #1
0
 private AbstractTree.Method GetMethodTree(System.Reflection.MethodInfo methodInfo, object instance)
 {
     Method = new AbstractTree.Method(methodInfo.Name);
     Log(ConsoleColor.Yellow, $"Начало парсинга метода {Method.Name}");
     methodInfo.Invoke(instance, null);            
     foreach(var command in Method.Commands)
     {
         Log(ConsoleColor.Cyan, $"   {command}");
     }
     Log(ConsoleColor.Yellow, $"Парсинг метода {Method.Name} завершен.");
     return Method;
 }
Example #2
0
 public Module AddMethod(Method method)
 {
     Methods.Add(method);
     method.Module = this;
     return this;
 }