164 references to Format
System.Configuration.ConfigurationManager (164)
src\libraries\Common\src\System\IO\TempFileCollection.cs (3)
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 (4)
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 (1)
44if (val == null) throw new InvalidOperationException(SR.Format(SR.AppSettingsReaderNoKey, key));
System\Configuration\AppSettingsSection.cs (2)
113SR.Format(SR.Config_name_value_file_section_file_invalid_root, elementName), 135SR.Format(SR.Config_base_unrecognized_attribute, internalReader.Name),
System\Configuration\BaseConfigurationRecord.cs (17)
1356SR.Format(SR.Config_exception_creating_section, factoryRecord.ConfigKey), 1499SR.Format(SR.Config_cannot_open_config_source, sectionXmlInfo.ConfigSource), 1601throw new ConfigurationErrorsException(SR.Format(SR.ProtectedConfigurationProvider_not_found, 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); 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), 2355new ConfigurationErrorsException(SR.Format(SR.Config_client_config_too_many_configsections_elements, tagName), xmlUtil), 2397SR.Format(SR.Config_unrecognized_configuration_section, configKey), xmlUtil), 3053SR.Format(SR.Cannot_declare_or_remove_implicit_section, name), 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),
System\Configuration\CallbackValidatorAttribute.cs (1)
39throw new ArgumentException(SR.Format(SR.Validator_method_not_found, _callbackMethodName));
System\Configuration\ClientSettingsStore.cs (1)
208throw new ConfigurationErrorsException(SR.Format(SR.SettingsSaveFailed, ex.Message), ex);
System\Configuration\ConfigurationConverterBase.cs (1)
23throw new ArgumentException(SR.Format(SR.Converter_unsupported_value_type, expected.Name));
System\Configuration\ConfigurationElement.cs (20)
109throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, LockItemKey)); 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)); 838throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, prop.Name)); 1081throw new ConfigurationErrorsException(SR.Format( 1171SR.Format(SR.Config_base_element_cannot_have_multiple_child_elements, prop.Name)); 1286throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, LockAttributesKey), 1289throw new ConfigurationErrorsException(SR.Format(SR.Empty_attribute, 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); 1764throw new ConfigurationErrorsException(SR.Format(SR.Validator_does_not_support_elem_type, 1833throw new ConfigurationErrorsException(SR.Format(SR.Config_base_required_attribute_missing, name),
System\Configuration\ConfigurationElementCollection.cs (19)
510throw new ConfigurationErrorsException(SR.Format(SR.Config_base_element_locked, _addElement)); 527SR.Format(SR.Config_base_collection_entry_already_exists, key), 628throw new ArgumentException(SR.Format(SR.Basicmap_item_name_reserved, ElementName)); 664throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 683if (index < -1) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 714SR.Format(SR.Config_base_collection_entry_already_exists, key), 745SR.Format(SR.Config_base_collection_entry_not_found, key)); 751throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, key)); 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)); 978if (entry == null) throw new ConfigurationErrorsException(SR.Format(SR.IndexOutOfRange, index)); 981throw new ConfigurationErrorsException(SR.Format(SR.Config_base_attribute_locked, 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));
System\Configuration\ConfigurationFileMap.cs (1)
31throw new ArgumentException(SR.Format(SR.Machine_config_file_not_found, machineConfigFilename),
System\Configuration\ConfigurationLockCollection.cs (5)
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\ConfigurationProperty.cs (5)
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)); 269throw new ArgumentException(SR.Format(SR.Property_name_reserved, name)); 281throw new ConfigurationErrorsException(SR.Format(SR.Default_value_wrong_type, Name));
System\Configuration\ConfigurationSectionGroup.cs (1)
55throw new ConfigurationErrorsException(SR.Format(SR.Config_tag_name_already_defined,
System\Configuration\ConfigurationValidatorAttribute.cs (1)
21throw new ArgumentException(SR.Format(SR.Validator_Attribute_param_not_validator,
System\Configuration\DpapiProtectedConfigurationProvider.cs (2)
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 (5)
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));
System\Configuration\GenericEnumConverter.cs (1)
52return new ArgumentException(SR.Format(SR.Invalid_enum_value, names));
System\Configuration\HandlerBase.cs (6)
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),
System\Configuration\Internal\InternalConfigHost.cs (3)
207throw new ArgumentException(SR.Format(SR.Config_source_not_under_config_dir, configSource)); 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 (1)
179throw new ConfigurationErrorsException(SR.Format(SR.Config_write_failed, target));
System\Configuration\LocalFileSettingsProvider.cs (2)
426throw new ConfigurationErrorsException(SR.Format(SR.BothScopeAttributes, setting.Name)); 430throw new ConfigurationErrorsException(SR.Format(SR.NoScopeAttributes, setting.Name));
System\Configuration\MgmtConfigurationRecord.cs (11)
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, 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)); 973throw new ArgumentException(SR.Format(SR.Filename_in_SaveAs_is_used_already, filename)); 1577SR.Format(SR.Config_inconsistent_location_attributes, configKey)); 1697SR.Format(SR.Config_exception_in_config_section_handler, 1885SR.Format(SR.Config_exception_in_config_section_handler, sectionRecord.ConfigKey), e,
System\Configuration\NameValueFileSectionHandler.cs (1)
59SR.Format(SR.Config_name_value_file_section_file_invalid_root, section.Name),
System\Configuration\ProtectedConfigurationProviderCollection.cs (1)
22SR.Format(SR.Config_provider_must_implement_type,
System\Configuration\ProtectedConfigurationSection.cs (1)
51throw new ArgumentException(SR.Format(SR.ProtectedConfigurationProvider_not_found, providerName), nameof(providerName));
System\Configuration\RegexStringValidator.cs (1)
32throw new ArgumentException(SR.Format(SR.Regex_validator_error, _expression));
System\Configuration\RuntimeConfigurationRecord.cs (2)
74SR.Format(SR.Config_exception_in_config_section_handler, 130SR.Format(SR.Config_element_locking_not_supported, sectionName), attribute);
System\Configuration\SectionInformation.cs (8)
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, 586throw new ConfigurationErrorsException(SR.Format(SR.Cannot_declare_or_remove_implicit_section, SectionName));
System\Configuration\SettingsBase.cs (8)
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 (3)
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 (1)
19throw new ArgumentException(SR.Format(SR.Config_provider_must_implement_type, typeof(SettingsProvider)), nameof(provider));
System\Configuration\StringAttributeCollection.cs (1)
81throw new ConfigurationErrorsException(SR.Format(SR.Config_base_value_cannot_contain, ","));
System\Configuration\StringValidator.cs (3)
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\TypeNameConverter.cs (1)
27if (result == null) throw new ArgumentException(SR.Format(SR.Type_cannot_be_resolved, (string)data));
System\Configuration\TypeUtil.cs (1)
151throw new TypeLoadException(SR.Format(SR.TypeNotPublic, type.AssemblyQualifiedName));
System\Configuration\ValidatorUtils.cs (1)
72throw new ArgumentException(SR.Format(SR.Validator_scalar_resolution_violation, resolutionAsString));
System\Configuration\XmlUtil.cs (4)
273SR.Format(SR.Config_base_unrecognized_attribute, Reader.Name), 291SR.Format(SR.Config_reserved_attribute, Reader.Name), 314SR.Format(SR.Empty_attribute, Reader.Name), 339new ConfigurationErrorsException(SR.Format(SR.Config_invalid_boolean_attribute, Reader.Name), this),
System\Diagnostics\ListenerElementsCollection.cs (8)
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 (1)
77throw new ConfigurationErrorsException(SR.Format(SR.Only_specify_one, Name));
System\Diagnostics\TraceUtils.cs (5)
41throw new ConfigurationErrorsException(SR.Format(SR.Could_not_find_type, className)); 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));