public static UIApplicationMenu[] getMenus(ConfigurationRoot menuConf) { ArrayList <UIApplicationMenu> menus = new ArrayList <UIApplicationMenu>(); ConfigurationBlock block = menuConf.getBlock(ConfigurationBlocksEnum.UIMenus.ToString()); for (int i = 0; i < block.BlockEntries.Length; i++) { ConfigurationEntry entry = block.getEntry(i); if (entry.Key == ConfigurationStatics.BLOCK_KEY_UIMENUROOT_SETTINGS) { continue; } string s = block.getEntryDetail(entry.Key, MenuConfigurationParamsEnum.Name.ToString()).KeyValue; UIApplicationMenu menuObj = new UIApplicationMenu(); menuObj.Code = entry.Key; menuObj.DisplayName = entry.get(MenuConfigurationParamsEnum.Name.ToString()).KeyValue; menuObj.MenuType = EnumHelper.toEnum <ApplicationMenuTypeEnum>(entry.get(MenuConfigurationParamsEnum.MenuType.ToString(), ApplicationMenuTypeEnum.Title.ToString()).KeyValue); menuObj.ObjectUrl = entry.get(MenuConfigurationParamsEnum.TargetUri.ToString(), "").KeyValue; menuObj.ParentCode = entry.get(MenuConfigurationParamsEnum.ParentKey.ToString(), "").KeyValue; menus.put(menuObj); } return(menus.toArray()); }
private BaseLogger getLogger() { ConfigurationRoot tmp = this.ConfigurationManager.iParseConfiguratation(this.Config.get(ConfigurationParamsEnum.ConfigurationPath.ToString()).KeyValue); ConfigurationBlock block = tmp.getBlock(ConfigurationBlocksEnum.Loggers.ToString()); for (int i = 0; i < block.BlockEntries.Length; i++) { ConfigurationEntry entry = block.BlockEntries[i]; if (!entry.Key.Equals(this.Config.get(LoggerParamsEnum.DefaultLogger.ToString()).KeyValue)) { continue; } string impl = entry.get(ConfigurationParamsEnum.ImplementationClass.ToString()).KeyValue; BaseLogger result = this.ClassFactory.createInstance <BaseLogger>(impl, new object[] { entry.Key, entry }); result.Initialize(); return(result); } return(null); }
public static ConfigurationEntry getDatabaseConfig(ConfigurationRoot root, string configKey) { return(root.getBlock(ConfigurationBlocksEnum.Databases.ToString()).getEntry(configKey)); }
public static ConfigurationEntry getManagerConfig(ConfigurationRoot root, string configKey) { return(root.getBlock(ConfigurationBlocksEnum.Managers.ToString()).getEntry(configKey)); }
public static ConfigurationEntry getUIMenuConfig(ConfigurationRoot root, int index) { return(root.getBlock(ConfigurationBlocksEnum.UIMenus.ToString()).getEntry(index)); }
public static ConfigurationEntry getUIMenuRootConfig(ConfigurationRoot root) { return(root.getBlock(ConfigurationBlocksEnum.UIMenus.ToString()).getEntry(ConfigurationStatics.BLOCK_KEY_UIMENUROOT_SETTINGS)); }
public static ConfigurationEntry getServiceClientConfig(ConfigurationRoot root, int clientIndex) { return(root.getBlock(ConfigurationBlocksEnum.ServiceClients.ToString()).getEntry(clientIndex)); }
public static ConfigurationEntry getServiceClientConfig(ConfigurationRoot root, string configKey) { return(root.getBlock(ConfigurationBlocksEnum.ServiceClients.ToString()).getEntry(configKey)); }
public static ConfigurationEntry getServerHostConfig(ConfigurationRoot root, int serverHostIndex) { return(root.getBlock(ConfigurationBlocksEnum.ServerHosts.ToString()).getEntry(serverHostIndex)); }