550 references to SR
System.Configuration.ConfigurationManager (550)
src\libraries\Common\src\System\IO\TempFileCollection.cs (6)
73throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileExtension)), nameof(fileExtension)); 85throw new ArgumentException(SR.Format(SR.InvalidNullEmptyArgument, nameof(fileName)), nameof(fileName)); 90throw new ArgumentException(SR.Format(SR.DuplicateFileName, fileName), nameof(fileName));
System\Configuration\ApplicationSettingsBase.cs (8)
473throw new ConfigurationErrorsException(SR.Format(SR.ProviderTypeLoadFailed, providerTypeName)); 480throw new ConfigurationErrorsException(SR.Format(SR.ProviderInstantiationFailed, providerTypeName)); 626throw new ConfigurationErrorsException(SR.Format(SR.ProviderInstantiationFailed, providerTypeName)); 631throw new ConfigurationErrorsException(SR.Format(SR.ProviderTypeLoadFailed, providerTypeName));
System\Configuration\AppSettingsReader.cs (5)
44if (val == null) throw new InvalidOperationException(SR.Format(SR.AppSettingsReaderNoKey, key)); 77string displayString = (val.Length == 0) ? SR.AppSettingsReaderEmptyString : val; 78throw new InvalidOperationException(SR.Format(SR.AppSettingsReaderCantParse, displayString, key, type));
System\Configuration\AppSettingsSection.cs (5)
113SR.Format(SR.Config_name_value_file_section_file_invalid_root, elementName), 124throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil); 135SR.Format(SR.Config_base_unrecognized_attribute, internalReader.Name),
System\Configuration\BaseConfigurationRecord.cs (82)
525ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, streamname, 0), 594ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, 600ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, 738ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, 1356SR.Format(SR.Config_exception_creating_section, factoryRecord.ConfigKey), 1374throw new ConfigurationErrorsException(SR.Config_file_has_changed, 1499SR.Format(SR.Config_cannot_open_config_source, sectionXmlInfo.ConfigSource), 1506throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil); 1515throw new ConfigurationErrorsException(SR.Protection_provider_syntax_error, xmlUtil); 1530throw new ConfigurationErrorsException(SR.Config_source_file_format, xmlUtil); 1588throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, filename, 1601throw new ConfigurationErrorsException(SR.Format(SR.ProtectedConfigurationProvider_not_found, 1629throw new ConfigurationErrorsException(SR.Config_object_is_null, filename, line); 1638SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey), e, filename, 1740SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey), e, 1759SR.Format(SR.Config_file_doesnt_have_root_configuration, xmlUtil.Filename), xmlUtil); 1776SR.Format(SR.Config_namespace_invalid, xmlUtil.Reader.Value, ConfigurationNamespace), 1866new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined_at_this_level, tagName), xmlUtil), 1882new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil), 2003SR.Format(SR.Config_tag_name_already_defined_at_this_level, tagName), 2021SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil), 2030new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, tagName), xmlUtil), 2119SR.Config_section_allow_exe_definition_attribute_invalid, 2131SR.Config_section_allow_definition_attribute_invalid, 2355new ConfigurationErrorsException(SR.Format(SR.Config_client_config_too_many_configsections_elements, tagName), xmlUtil), 2364new ConfigurationErrorsException(SR.Config_location_location_not_allowed, xmlUtil), 2397SR.Format(SR.Config_unrecognized_configuration_section, configKey), xmlUtil), 2473SR.Config_section_cannot_be_used_in_location, xmlUtil), 2488SR.Config_sections_must_be_unique, xmlUtil), 2510new ConfigurationErrorsException(SR.Config_section_locked, xmlUtil), 2535new ConfigurationErrorsException(SR.Config_source_syntax_error, xmlUtil), 2558SR.Protection_provider_syntax_error, xmlUtil), 2580new ConfigurationErrorsException(SR.Config_source_syntax_error, xmlUtil), 2605throw ExceptionUtil.WrapAsConfigException(SR.Config_source_invalid, e, xmlUtil); 2723new ConfigurationErrorsException(SR.Invalid_override_mode_declaration, xmlUtil), 2742new ConfigurationErrorsException(SR.Invalid_override_mode_declaration, 2782SR.Location_invalid_inheritInChildApplications_in_machine_or_root_web_config, 2907SR.Config_sections_must_be_unique, 2913SR.Config_sections_must_be_unique, 2980SR.Config_section_locked, 3028throw new ConfigurationErrorsException(SR.Config_tag_name_invalid, errorInfo); 3041throw ExceptionUtil.WrapAsConfigException(SR.Config_tag_name_invalid, e, errorInfo); 3053SR.Format(SR.Cannot_declare_or_remove_implicit_section, name), errorInfo); 3057throw new ConfigurationErrorsException(SR.Config_tag_name_cannot_begin_with_config, errorInfo); 3060throw new ConfigurationErrorsException(SR.Config_tag_name_cannot_be_location, errorInfo); 3082throw new ConfigurationErrorsException(SR.Config_location_path_invalid_first_character, errorInfo); 3086throw new ConfigurationErrorsException(SR.Config_location_path_invalid_first_character, errorInfo); 3092throw new ConfigurationErrorsException(SR.Config_location_path_invalid_last_character, errorInfo); 3096throw new ConfigurationErrorsException(SR.Config_location_path_invalid_last_character, errorInfo); 3100throw new ConfigurationErrorsException(SR.Config_location_path_invalid_character, errorInfo); 3199throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); 3203throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); 3206throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); 3212throw new ConfigurationErrorsException(SR.Config_source_invalid_format, errorInfo); 3229throw new ConfigurationErrorsException(SR.Format(SR.Config_source_cannot_be_shared, 3316SR.Format(SR.Config_source_cannot_be_shared, configSourceArg), 3342SR.Format(SR.Config_source_parent_conflict, configSourceArg), 3558throw new ConfigurationErrorsException(SR.Protection_provider_invalid_format, errorInfo); 3579throw new ConfigurationErrorsException(SR.EncryptedNode_not_found, filename, lineNumber); 3595throw new ConfigurationErrorsException(SR.EncryptedNode_not_found, filename, lineNumber); 3600throw new ConfigurationErrorsException(SR.EncryptedNode_is_in_invalid_format, filename, lineNumber); 3617SR.Format(SR.Decryption_failed, protectionProvider.Name, e.Message), e, filename, lineNumber); 3630throw new ConfigurationErrorsException(SR.EncryptedNode_is_in_invalid_format, filename, lineNumber);
System\Configuration\CallbackValidatorAttribute.cs (2)
39throw new ArgumentException(SR.Format(SR.Validator_method_not_found, _callbackMethodName));
System\Configuration\ClientConfigurationHost.cs (3)
362SR.Config_allow_exedefinition_error_machine, errorInfo), 364SR.Config_allow_exedefinition_error_application, errorInfo), 366SR.Config_allow_exedefinition_error_roaminguser, errorInfo),
System\Configuration\ClientConfigurationSystem.cs (2)
163new ConfigurationErrorsException(SR.Config_client_config_init_error, e); 218_initError = new ConfigurationErrorsException(SR.Config_client_config_init_error, ex);
System\Configuration\ClientSettingsStore.cs (6)
158throw new ConfigurationErrorsException(SR.UserSettingsNotSupported); 176throw new ConfigurationErrorsException(SR.UserSettingsNotSupported); 208throw new ConfigurationErrorsException(SR.Format(SR.SettingsSaveFailed, ex.Message), ex); 213throw new ConfigurationErrorsException(SR.SettingsSaveFailedNoSection); 265_ => throw new ArgumentException(SR.UnknownUserLevel),
System\Configuration\ConfigurationConverterBase.cs (2)
23throw new ArgumentException(SR.Format(SR.Converter_unsupported_value_type, expected.Name));
System\Configuration\ConfigurationElement.cs (55)
109throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, LockItemKey)); 213throw new ConfigurationErrorsException(SR.Config_element_no_context); 397SR.Format(SR.Config_base_attribute_locked, propInfo.Name)); 523throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, elementName), 802SR.Format(SR.Validator_does_not_support_elem_type, type.Name)); 829if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 838throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, prop.Name)); 1081throw new ConfigurationErrorsException(SR.Format( 1082SR.Config_base_required_attribute_locked, prop.Name)); 1171SR.Format(SR.Config_base_element_cannot_have_multiple_child_elements, prop.Name)); 1256format = value != null ? SR.Config_base_invalid_element_to_lock : SR.Config_base_invalid_element_to_lock_by_add; 1260format = value != null ? SR.Config_base_invalid_attribute_to_lock : SR.Config_base_invalid_attribute_to_lock_by_add; 1266SR.Format(format, attribToLockTrim, sb), 1270throw new ConfigurationErrorsException(SR.Format(format, 1286throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, LockAttributesKey), 1289throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, LockElementsKey), 1293SR.Format(SR.Config_empty_lock_attributes_except, LockAllAttributesExceptKey, 1297SR.Format(SR.Config_empty_lock_element_except, LockAllElementsExceptKey, LockElementsKey), 1353SR.Format(SR.Config_base_required_attribute_lock_attempt, propToLock.Name)); 1413throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, reader.Name), reader); 1430SR.Format(SR.Config_base_attribute_locked, propertyName), reader); 1440SR.Format(SR.Config_base_unrecognized_attribute, propertyName), reader); 1461SR.Format(SR.Config_invalid_boolean_attribute, propertyName), reader); 1485SR.Format(SR.Config_base_unrecognized_attribute, propertyName), 1518SR.Format(SR.Config_base_element_cannot_have_multiple_child_elements, 1533SR.Format(SR.Config_base_property_is_not_a_configuration_element, 1546SR.Format(SR.Config_base_unrecognized_element_name, propertyName), reader); 1558SR.Config_base_section_invalid_content, reader); 1764throw new ConfigurationErrorsException(SR.Format(SR.Validator_does_not_support_elem_type, 1780throw new ConfigurationErrorsException(SR.Format(SR.Validator_element_not_valid, elem.ElementTagName, 1833throw new ConfigurationErrorsException(SR.Format(SR.Config_base_required_attribute_missing, name),
System\Configuration\ConfigurationElementCollection.cs (64)
51throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultAddItemName, value)); 61throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultRemoveItemName, value)); 72throw new ArgumentException(SR.Format(SR.Item_name_reserved, DefaultClearItemsName, value)); 82if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 507if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 510throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, _addElement)); 520throw new ConfigurationErrorsException(SR.Config_base_collection_item_locked); 527SR.Format(SR.Config_base_collection_entry_already_exists, key), 619if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 628throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, ElementName)); 648throw new ConfigurationErrorsException(SR.Config_base_cannot_add_items_below_inherited_items); 655throw new ConfigurationErrorsException(SR.Config_base_cannot_add_items_above_inherited_items); 664throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 682if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 683if (index < -1) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 714SR.Format(SR.Config_base_collection_entry_already_exists, key), 733throw new ConfigurationErrorsException(SR.Config_base_read_only); 745SR.Format(SR.Config_base_collection_entry_not_found, key)); 751throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, key)); 767SR.Config_base_cannot_remove_inherited_items); 775SR.Config_base_cannot_remove_inherited_items); 790throw new ConfigurationErrorsException(SR.Config_base_collection_entry_already_removed); 797SR.Config_base_collection_elements_may_not_be_removed); 816throw new ConfigurationErrorsException(SR.Format(SR.Config_base_collection_entry_not_found, key)); 851if (index < 0) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 869throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 889if (index < 0) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 903if (entry == null) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 910if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 941throw new ConfigurationErrorsException(SR.Config_base_collection_item_locked_cannot_clear); 963if (IsReadOnly()) throw new ConfigurationErrorsException(SR.Config_base_read_only); 978if (entry == null) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 981throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, 996throw new ConfigurationErrorsException(SR.Config_base_cannot_remove_inherited_items); 999throw new ConfigurationErrorsException(SR.Config_base_cannot_remove_inherited_items); 1016throw new ConfigurationErrorsException(SR.Config_base_collection_entry_already_removed); 1021throw new ConfigurationErrorsException(SR.Config_base_collection_elements_may_not_be_removed); 1064throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, 1125SR.Format(SR.Config_base_unrecognized_attribute, propertyName), reader); 1141throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName)); 1153throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, elementName)); 1193throw new ConfigurationErrorsException(SR.Config_base_invalid_element_key);
System\Configuration\ConfigurationFileMap.cs (2)
31throw new ArgumentException(SR.Format(SR.Machine_config_file_not_found, machineConfigFilename),
System\Configuration\ConfigurationLockCollection.cs (10)
129throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, name)); 162throw new ConfigurationErrorsException(SR.Format(SR.Config_base_required_attribute_lock_attempt, 253throw new ConfigurationErrorsException(SR.Format(SR.Config_base_collection_entry_not_found, name)); 261throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, name)); 324throw new ConfigurationErrorsException(SR.Format(SR.Config_base_collection_entry_not_found, name));
System\Configuration\ConfigurationManager.cs (5)
42throw new ConfigurationErrorsException(SR.Config_appsettings_declaration_invalid); 60throw new ConfigurationErrorsException(SR.Config_connectionstrings_declaration_invalid); 75throw new InvalidOperationException(SR.Config_system_already_set); 109new ConfigurationErrorsException(SR.Config_client_config_init_error, e); 211throw new ArgumentException(SR.Config_configmanager_open_noexe);
System\Configuration\ConfigurationProperty.cs (21)
103SR.Format(SR.Validator_multiple_validator_attributes, info.Name)); 228SR.Format(SR.Config_properties_may_not_be_derived_from_configuration_section, name)); 259throw new ConfigurationErrorsException(SR.Format(SR.Validator_does_not_support_prop_type, Name)); 266throw new ArgumentException(SR.String_null_or_empty, nameof(name)); 269throw new ArgumentException(SR.Format(SR.Property_name_reserved, name)); 281throw new ConfigurationErrorsException(SR.Format(SR.Default_value_wrong_type, Name)); 309throw new ConfigurationErrorsException(SR.Format(SR.Default_value_conversion_error_from_string, 340throw new ConfigurationErrorsException(SR.Format(SR.Top_level_conversion_error_from_string, Name, 364SR.Format(SR.Top_level_conversion_error_to_string, Name, ex.Message)); 377SR.Format(SR.Top_level_validation_error, Name, ex.Message), ex); 405throw new ConfigurationErrorsException(SR.Format(SR.No_converter, Name, Type.Name));
System\Configuration\ConfigurationSection.cs (1)
40throw new ConfigurationErrorsException(SR.Config_base_expected_to_find_element, reader);
System\Configuration\ConfigurationSectionCollection.cs (1)
43throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached);
System\Configuration\ConfigurationSectionGroup.cs (7)
33throw new InvalidOperationException(SR.Config_root_section_group_cannot_be_edited); 45SR.Config_cannot_edit_configurationsectiongroup_in_location_config); 55throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, 140throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached); 153throw new InvalidOperationException(SR.Config_root_section_group_cannot_be_edited); 156throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_in_location_config);
System\Configuration\ConfigurationSectionGroupCollection.cs (1)
46throw new InvalidOperationException(SR.Config_cannot_edit_configurationsectiongroup_when_not_attached);
System\Configuration\ConfigurationValidatorAttribute.cs (2)
21throw new ArgumentException(SR.Format(SR.Validator_Attribute_param_not_validator,
System\Configuration\DefaultSection.cs (1)
52throw new ConfigurationErrorsException(SR.Config_base_expected_to_find_element, xmlReader);
System\Configuration\DpapiProtectedConfigurationProvider.cs (8)
23throw new ConfigurationErrorsException(SR.DPAPI_bad_data); 28throw new ConfigurationErrorsException(SR.DPAPI_bad_data); 32throw new ConfigurationErrorsException(SR.DPAPI_bad_data); 36throw new ConfigurationErrorsException(SR.DPAPI_bad_data); 100throw new ConfigurationErrorsException(SR.Format(SR.Unrecognized_initialization_value, configurationValues.GetKey(0))); 133throw new ConfigurationErrorsException(SR.Format(SR.Config_invalid_boolean_attribute, valueName));
System\Configuration\ExceptionUtil.cs (15)
11internal static string NoExceptionInformation => SR.No_exception_information_available; 15return new ArgumentException(SR.Format(SR.Parameter_Invalid, parameter), parameter); 20return new ArgumentException(SR.Format(SR.Parameter_NullOrEmpty, parameter), parameter); 25return new ArgumentException(SR.Format(SR.Property_Invalid, property), property); 30return new ArgumentException(SR.Format(SR.Property_NullOrEmpty, property), property); 35return new InvalidOperationException(SR.Format(SR.Unexpected_Error, methodName)); 75SR.Format(SR.Wrapped_exception_message, outerMessage, e.Message), 83SR.Format(SR.Wrapped_exception_message, outerMessage, NoExceptionInformation),
System\Configuration\GenericEnumConverter.cs (2)
52return new ArgumentException(SR.Format(SR.Invalid_enum_value, names));
System\Configuration\HandlerBase.cs (17)
19SR.Format(SR.Config_missing_required_attribute, attrib, node.Name), 53SR.Format(SR.Config_invalid_boolean_attribute, a.Name), 75SR.Format(SR.Config_invalid_integer_attribute, a.Name), a); 85SR.Format(SR.Config_invalid_integer_attribute, a.Name), 103SR.Format(SR.Config_base_unrecognized_attribute, node.Attributes[0].Name), 135SR.Format(SR.Config_base_required_attribute_missing, name), 142SR.Format(SR.Config_base_required_attribute_empty, name), 153throw new ConfigurationErrorsException(SR.Config_base_elements_only, node); 173throw new ConfigurationErrorsException(SR.Config_base_no_child_nodes, node.FirstChild); 179throw new ConfigurationErrorsException(SR.Config_base_unrecognized_element, node);
System\Configuration\IgnoreSection.cs (1)
52throw new ConfigurationErrorsException(SR.Config_base_expected_to_find_element, xmlReader);
System\Configuration\IntegerValidator.cs (1)
26throw new ArgumentOutOfRangeException(nameof(minValue), SR.Validator_min_greater_than_max);
System\Configuration\IntegerValidatorAttribute.cs (2)
20throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max); 32throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max);
System\Configuration\Internal\InternalConfigHost.cs (7)
207throw new ArgumentException(SR.Format(SR.Config_source_not_under_config_dir, configSource)); 237throw new ConfigurationErrorsException(SR.Config_no_stream_to_write); 259throw new IOException(SR.Format(SR.Config_invalid_attributes_for_write, streamName)); 272throw new ConfigurationErrorsException(SR.Format(SR.Config_write_failed, streamName), e);
System\Configuration\Internal\WriteFileContext.cs (2)
179throw new ConfigurationErrorsException(SR.Format(SR.Config_write_failed, target));
System\Configuration\LocalFileSettingsProvider.cs (6)
111throw new ConfigurationErrorsException(SR.UserSettingsNotSupported); 281throw new ConfigurationErrorsException(SR.UserSettingsNotSupported); 426throw new ConfigurationErrorsException(SR.Format(SR.BothScopeAttributes, setting.Name)); 430throw new ConfigurationErrorsException(SR.Format(SR.NoScopeAttributes, setting.Name));
System\Configuration\LongValidator.cs (1)
26throw new ArgumentOutOfRangeException(nameof(minValue), SR.Validator_min_greater_than_max);
System\Configuration\LongValidatorAttribute.cs (2)
20throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max); 31throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max);
System\Configuration\MgmtConfigurationRecord.cs (41)
199throw new ConfigurationErrorsException(SR.Format(SR.Config_unrecognized_configuration_section, 271SR.Format(SR.Config_exception_creating_section_handler, factoryRecord.ConfigKey), 417SR.Format(SR.Config_exception_in_config_section_handler, 488SR.Format(SR.Config_exception_in_config_section_handler, 546throw new ConfigurationErrorsException(SR.Config_source_requires_file); 570SR.Format(SR.Config_source_cannot_be_shared, newConfigSource)); 607throw new ConfigurationErrorsException(SR.Format(SR.Config_unexpected_node_type, reader.NodeType)); 613throw new ConfigurationErrorsException(SR.Format(SR.Config_unexpected_element_name, reader.Name)); 622throw new ConfigurationErrorsException(SR.Config_unexpected_element_end, 634throw new ConfigurationErrorsException(SR.Config_invalid_node_type, reader); 640throw new ConfigurationErrorsException(SR.Config_more_data_than_expected, reader); 658throw new InvalidOperationException(SR.Config_add_configurationsection_in_location_config); 666throw new InvalidOperationException(SR.Config_add_configurationsection_already_added); 673throw new ArgumentException(SR.Config_add_configurationsection_already_exists); 818throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_in_location_config); 828throw new InvalidOperationException(SR.Config_add_configurationsectiongroup_already_added); 834throw new ArgumentException(SR.Config_add_configurationsectiongroup_already_exists); 973throw new ArgumentException(SR.Format(SR.Filename_in_SaveAs_is_used_already, filename)); 1020throw new ConfigurationErrorsException(SR.Config_file_has_changed, 1027throw new ConfigurationErrorsException(SR.Config_data_read_count_mismatch); 1049throw new ConfigurationErrorsException(SR.Config_file_has_changed, changedStreamName, 0); 1096throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, 1116throw new ConfigurationErrorsException(SR.Config_file_has_changed, 1577SR.Format(SR.Config_inconsistent_location_attributes, configKey)); 1677SR.Format(SR.Encryption_failed, 1697SR.Format(SR.Config_exception_in_config_section_handler, 1706throw new ConfigurationErrorsException(SR.Config_section_locked, (IConfigErrorInfo)null); 1885SR.Format(SR.Config_exception_in_config_section_handler, sectionRecord.ConfigKey), e, 3049throw ExceptionUtil.WrapAsConfigException(SR.Config_error_loading_XML_file, e, configSourceStreamName, 0);
System\Configuration\NameValueFileSectionHandler.cs (2)
59SR.Format(SR.Config_name_value_file_section_file_invalid_root, section.Name),
System\Configuration\OverrideModeSetting.cs (2)
67SR.Config_section_override_mode_attribute_invalid, 333throw new ConfigurationErrorsException(SR.Cannot_change_both_AllowOverride_and_OverrideMode);
System\Configuration\PositiveTimeSpanValidator.cs (1)
21throw new ArgumentException(SR.Validator_timespan_value_must_be_positive);
System\Configuration\ProtectedConfigurationProviderCollection.cs (2)
22SR.Format(SR.Config_provider_must_implement_type,
System\Configuration\ProtectedConfigurationSection.cs (3)
51throw new ArgumentException(SR.Format(SR.ProtectedConfigurationProvider_not_found, providerName), nameof(providerName)); 81throw new ArgumentException(SR.WrongType_of_Protected_provider, nameof(pn));
System\Configuration\Provider\ProviderBase.cs (2)
24throw new InvalidOperationException(SR.Provider_Already_Initialized); 31throw new ArgumentException(SR.Config_provider_name_null_or_empty, nameof(name));
System\Configuration\Provider\ProviderCollection.cs (4)
39throw new NotSupportedException(SR.CollectionReadOnly); 45throw new ArgumentException(SR.Config_provider_name_null_or_empty); 53throw new NotSupportedException(SR.CollectionReadOnly); 67throw new NotSupportedException(SR.CollectionReadOnly);
System\Configuration\RegexStringValidator.cs (2)
32throw new ArgumentException(SR.Format(SR.Regex_validator_error, _expression));
System\Configuration\RuntimeConfigurationRecord.cs (4)
74SR.Format(SR.Config_exception_in_config_section_handler, 130SR.Format(SR.Config_element_locking_not_supported, sectionName), attribute);
System\Configuration\SectionInformation.cs (30)
96throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 117throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 138throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 164throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 328throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 349throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, ConfigKey)); 379throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined, 489if (IsRuntime) throw new InvalidOperationException(SR.Config_operation_not_runtime); 495throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_not_attached); 512throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_locked); 515throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_parentsection); 520throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_location_locked); 526throw new InvalidOperationException(SR.Config_configsection_parentnotvalid); 535throw new InvalidOperationException(SR.Config_cannot_edit_locationattriubtes); 541throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_in_location_config); 545throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_it_is_implicit); 549throw new InvalidOperationException(SR.Config_cannot_edit_configurationsection_when_it_is_undeclared); 586throw new ConfigurationErrorsException(SR.Format(SR.Cannot_declare_or_remove_implicit_section, SectionName)); 591SR.Config_cannot_edit_configurationsection_when_it_is_undeclared); 609throw new InvalidOperationException(SR.Config_not_allowed_to_encrypt_this_section); 617else throw new InvalidOperationException(SR.Must_add_to_config_before_protecting_it); 641throw new InvalidOperationException(SR.Config_getparentconfigurationsection_first_instance);
System\Configuration\SettingsBase.cs (16)
56throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName)); 59throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName)); 66throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName)); 74throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName)); 78throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName)); 81throw new SettingsPropertyIsReadOnlyException(SR.Format(SR.SettingsPropertyReadOnly, propertyName)); 84throw new SettingsPropertyWrongTypeException(SR.Format(SR.SettingsPropertyWrongType, propertyName)); 92throw new SettingsPropertyNotFoundException(SR.Format(SR.SettingsPropertyNotFound, propertyName));
System\Configuration\SettingsPropertyValue.cs (8)
145throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value, Property.Name, e.Message)); 150throw new ArgumentException(SR.Format(SR.Could_not_create_from_default_value_2, Property.Name)); 211throw new ArgumentException(SR.Format(SR.Unable_to_convert_type_from_string, type), nameof(type)); 264throw new ArgumentException(SR.Format(SR.Unable_to_convert_type_to_string, type), nameof(type));
System\Configuration\SettingsProviderCollection.cs (2)
19throw new ArgumentException(SR.Format(SR.Config_provider_must_implement_type, typeof(SettingsProvider)), nameof(provider));
System\Configuration\StringAttributeCollection.cs (3)
75if (IsReadOnly) throw new ConfigurationErrorsException(SR.Config_base_read_only); 81throw new ConfigurationErrorsException(SR.Format(SR.Config_base_value_cannot_contain, ","));
System\Configuration\StringValidator.cs (6)
40throw new ArgumentException(SR.Format(SR.Validator_string_min_length, _minLength)); 42throw new ArgumentException(SR.Format(SR.Validator_string_max_length, _maxLength)); 52throw new ArgumentException(SR.Format(SR.Validator_string_invalid_chars, _invalidChars));
System\Configuration\StringValidatorAttribute.cs (2)
21throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max); 33throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max);
System\Configuration\SubclassTypeValidator.cs (2)
33throw new ArgumentException(SR.Format(SR.Subclass_validator_error, ((Type)value).FullName,
System\Configuration\TimeSpanSecondsConverter.cs (1)
29throw new ArgumentException(SR.Converter_timespan_not_in_second);
System\Configuration\TimeSpanValidator.cs (1)
26throw new ArgumentOutOfRangeException(nameof(minValue), SR.Validator_min_greater_than_max);
System\Configuration\TimeSpanValidatorAttribute.cs (2)
29throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max); 43throw new ArgumentOutOfRangeException(nameof(value), SR.Validator_min_greater_than_max);
System\Configuration\TypeNameConverter.cs (2)
27if (result == null) throw new ArgumentException(SR.Format(SR.Type_cannot_be_resolved, (string)data));
System\Configuration\TypeUtil.cs (4)
151throw new TypeLoadException(SR.Format(SR.TypeNotPublic, type.AssemblyQualifiedName)); 164SR.Format(SR.Config_type_doesnt_inherit_from_type, type.FullName, baseType.FullName));
System\Configuration\ValidatorUtils.cs (8)
16throw new ArgumentException(SR.Validator_value_type_invalid, string.Empty); 50? SR.Validation_scalar_range_violation_not_different 51: SR.Validation_scalar_range_violation_not_equal; 57? SR.Validation_scalar_range_violation_not_outside_range 58: SR.Validation_scalar_range_violation_not_in_range; 61throw new ArgumentException(SR.Format(CultureInfo.InvariantCulture, 72throw new ArgumentException(SR.Format(SR.Validator_scalar_resolution_violation, resolutionAsString));
System\Configuration\XmlUtil.cs (13)
92throw new ConfigurationErrorsException(SR.Config_base_unrecognized_element, this); 238SR.Config_base_unrecognized_element, 273SR.Format(SR.Config_base_unrecognized_attribute, Reader.Name), 282SR.Format(SR.Config_missing_required_attribute, attrib, Reader.Name), 291SR.Format(SR.Config_reserved_attribute, Reader.Name), 300SR.Config_base_unrecognized_element, 314SR.Format(SR.Empty_attribute, Reader.Name), 339new ConfigurationErrorsException(SR.Format(SR.Config_invalid_boolean_attribute, Reader.Name), this),
System\Diagnostics\ListenerElementsCollection.cs (16)
188throw new ConfigurationErrorsException(SR.Format(SR.Reference_listener_cant_have_properties, Name)); 193throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name)); 199throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name)); 225throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_listener, Name), e); 314throw new ConfigurationErrorsException(SR.Format(SR.Reference_listener_cant_have_properties, Name)); 319throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name)); 325throw new ConfigurationErrorsException(SR.Format(SR.Reference_to_nonexistent_listener, Name)); 365throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_listener, Name), e);
System\Diagnostics\SourceElementsCollection.cs (2)
77throw new ConfigurationErrorsException(SR.Format(SR.Only_specify_one, Name));
System\Diagnostics\TraceUtils.cs (14)
25throw new ConfigurationErrorsException(SR.EmptyTypeName_NotAllowed); 41throw new ConfigurationErrorsException(SR.Format(SR.Could_not_find_type, className)); 46throw new ConfigurationErrorsException(SR.Format(SR.Incorrect_base_type, className, baseType.FullName)); 54throw new ConfigurationErrorsException(SR.TL_InitializeData_NotSpecified); 59throw new ConfigurationErrorsException(SR.Format(SR.Could_not_get_constructor, className)); 95throw new ConfigurationErrorsException(SR.Format(SR.Could_not_get_constructor, className)); 135throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_type_instance, className), innerException); 138throw new ConfigurationErrorsException(SR.Format(SR.Could_not_create_type_instance, className));