public ModuleApiDescriptionModel AddModule(ModuleApiDescriptionModel module)
        {
            if (this.Modules.ContainsKey(module.Name))
            {
                throw new AbpException("There is already a module with same name: " + module.Name);
            }

            return(this.Modules[module.Name] = module);
        }
Esempio n. 2
0
        public ModuleApiDescriptionModel CreateSubModel(string[] controllers, string[] actions)
        {
            var subModel = new ModuleApiDescriptionModel(this.Name);

            foreach (var controller in this.Controllers.Values)
            {
                if (controllers == null || controllers.Contains(controller.Name))
                {
                    subModel.AddController(controller.CreateSubModel(actions));
                }
            }

            return(subModel);
        }