private static MayorTextStringElement GetTextString(string elementName) { if (_section == null) _section = ConfigurationManagerFunctions.GetSection<StaticStringConfigurationSection>("StaticStringSection"); return _section.MayorTextStrings.Cast<MayorTextStringElement>() .FirstOrDefault(element => element.Name.EqualsIgnoreCase(elementName)); }
private static ConstantElement GetConfigConstant(string elementName) { if (_configSection == null) { _configSection = ConfigurationManagerFunctions.GetSection <ConstantConfigurationSection>("ConstantSection"); } return (_configSection.Constants.Cast <ConstantElement>() .FirstOrDefault(element => element.Name.EqualsIgnoreCase(elementName))); }