예제 #1
0
        public ModuleApiDescriptionModel AddModule(ModuleApiDescriptionModel module)
        {
            if (Modules.ContainsKey(module.RootPath))
            {
                throw new PlusException("There is already a module with same root path: " + module.RootPath);
            }

            return(Modules[module.RootPath] = module);
        }
예제 #2
0
 public ModuleApiDescriptionModel GetOrAddModule(string rootPath, string remoteServiceName)
 {
     return(Modules.GetOrAdd(rootPath, () => ModuleApiDescriptionModel.Create(rootPath, remoteServiceName)));
 }