public ModuleApiDescriptionModel AddModule(ModuleApiDescriptionModel module) { if (Modules.ContainsKey(module.Name)) { throw new SharePlatformException("已存在同名模块: " + module.Name); } return(Modules[module.Name] = module); }
public ModuleApiDescriptionModel CreateSubModel(string[] controllers, string[] actions) { var subModel = new ModuleApiDescriptionModel(Name); foreach (var controller in Controllers.Values) { if (controllers == null || controllers.Contains(controller.Name)) { subModel.AddController(controller.CreateSubModel(actions)); } } return(subModel); }