Beispiel #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);
        }
Beispiel #2
0
 public ModuleApiDescriptionModel GetOrAddModule(string rootPath, string remoteServiceName)
 {
     return(Modules.GetOrAdd(rootPath, () => ModuleApiDescriptionModel.Create(rootPath, remoteServiceName)));
 }