Ejemplo n.º 1
0
        public static IEnumerable<MethodInfo> GetFunctionList(ModuleBase module)
        {
            var methods = from item in module.GetType().GetMethods()
                          where (item.GetCustomAttributes(typeof(ModuleMethod), true).Length > 0)
                          select item;

            return methods;
        }
Ejemplo n.º 2
0
        private void RegisterModule(ModuleBase module)
        {
            string nameSpace = module.Namespace;

            this.NewTable(nameSpace);

            foreach (var method in ModuleLoader.GetFunctionList(module))
            {
                string path = string.Format("{0}.{1}", nameSpace, method.Name);
                RegisterFunction(path, module, method);
            }
        }
Ejemplo n.º 3
0
 public static string[] GetFunctionsHelp(ModuleBase module)
 {
     var methods = GetFunctionList(module);
     return GetFunctionsHelp(methods, module.Namespace);
 }
Ejemplo n.º 4
0
 public void AddModule(ModuleBase module)
 {
     RegisterModule(module);
 }