public ModuleApiDescriptionModel AddModule(ModuleApiDescriptionModel module) { if (Modules.ContainsKey(module.Name)) { throw new CodeZeroException("There is already a module with same name: " + 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); }