Exemplo n.º 1
0
        public ModuleApiDescriptionModel AddModule(ModuleApiDescriptionModel module)
        {
            if (Modules.ContainsKey(module.Name))
            {
                throw new StudioXException("There is already a module with same name: " + module.Name);
            }

            return(Modules[module.Name] = module);
        }
Exemplo n.º 2
0
        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);
        }