2005-12-02 Chris Toshok * CommaDelimitedStringCollectionConverter.cs (ConvertTo): change the type check away from an exact check for CommaDelimitedStringCollection to an assignable test from StringCollection. This is due to the fact that AuthorizationRule doesn't create CommaDelimitedStringCollections, for some odd reason. It uses StringCollections. * PropertyInformation.cs (Value): remove the case for IsDefaultCollection - it's not necessary, as the property is an Element. * ConnectionStringSettings.cs: fix formatting and remove some #regions. * ConnectionStringSettingsCollection.cs: same. * ConnectionStringsSection.cs: same. * ConfigurationElement.cs (SerializeToXmlElement): don't write the enclosing start/end elements if the elementName is null or "". this fixes the case for the DefaultCollections (at least in the case of connectionStrings). * IgnoreSection.cs (Properties): remove the MonoTODO. * SectionInfo.cs (WriteData): remove the "" output. 2005-11-28 Chris Toshok * ProviderSettings.cs: use ConfigurationProperty's to implement the properties. 2005-11-24 Chris Toshok * ConfigurationProperty.cs (Validate): add internal method. 2005-11-24 Chris Toshok * ConfigurationElement.cs (ElementProperty): make this protected internal virtual instead of public. (SetPropertyValue): add a validator call and a blurb about the code based on information gleaned from tests. (set_Item (string)): call SetPropertyValue in the setter. 2005-11-14 Chris Toshok * CommaDelimitedStringCollection.cs: reformat things a bit, and flag ToString() as override. * DefaultSection.cs: new stubbed out implementation. * CommaDelimitedStringCollectionConverter.cs: new implementation. 2005-11-10 Chris Toshok * AppSettingsSection.cs (DeserializeElement): stop explicitly calling Settings.DeserializeElement, as the DefaultCollection works now. * ConfigurationElement.cs (DeserializeElement): rework the loop here so that we actually loop over all the content elements. 2005-11-09 Chris Toshok * ConfigurationElement.cs: Add support for DefaultCollection attributes. * PropertyInformation.cs (PropertyInformation.Value): add case for IsDefaultCollection. * SectionGroupInfo.cs (SectionGroupInfo.ReadConfig): when we read a "type" attribute, make sure the cached System.Type is cleared. 2005-10-25 Chris Toshok * InfiniteTimeSpanConverter.cs: new implementation. * InfiniteIntConverter.cs: new implementation. * GenericEnumConverter.cs: new implementation. * Configuration.cs: we don't need to check with "is" after we use "as".. just check for null-ness. * KeyValueConfigurationCollection.cs: GetElementKey should throw NRE if element == null. * CommaDelimitedStringCollection.cs: raise the correct exceptions in the read only case, and return null from ToString if there are 0 elements. 2005-10-25 Chris Toshok * PositiveTimeSpanValidatorAttribute.cs: new implementation. * PositiveTimeSpanValidator.cs: new implementation. 2005-10-24 Chris Toshok * TimeSpanSecondsOrInfiniteConverter.cs: new implementation. * TypeNameConverter.cs: new implementation. * WhiteSpaceTrimStringConverter.cs: new implementation. 2005-10-24 Chris Toshok * AppSettingsSection.cs (DeserializeElement, SerializeSection): split the behavior based on if File == "". If it is, we do the default. otherwise we throw NIE. * ConnectionStringsSection.cs (DeserializeElement): we shouldn't need this, but we do until the IsDefaultCollection stuff is fixed. * ConfigurationElementCollection.cs (OnDeserializeUnrecognizedElement): for clearElementName, make sure we have no attributes. * ConnectionStringSettingsCollection.cs (get_Properties): for now just chain up to base.Properties. * ConfigurationElement.cs (ReflectProperties): do the default value/property type check in a more robust way, using Convert.ChangeType. 2005-10-24 Chris Toshok * ConfigurationElement.cs: treat ConfigurationProperty.NoDefaultValue the same as null when we're checking the default value's type. this fixes t13 and 14. * ConnectionStringsSection.cs (ConnectionStrings): fix the DefaultValue in the ConfigurationPropertyAttribute. 2005-10-24 Chris Toshok * KeyValueConfigurationCollection.cs (GetElementKey): sacrifice one test to get another working. Return a valid key even if the element is not in this collection. (get_ThrowOnDuplicate): return false. * ConfigurationElementCollection.cs (BaseAdd): if we're adding an element with the same key, overwrite the old one (remove the old one after inserting the new one). Also, re-enable the throwing of exceptions if ThrowOnDuplicate == true. 2005-10-24 Chris Toshok * AppSettingsSection.cs (Settings): fix ConfigurationProperty attribute. * ProtectedConfigurationSection.cs (Providers): same. 2005-10-12 Chris Toshok * ConfigurationPermission.cs: flesh out as per tests. 2005-10-11 Chris Toshok * ConfigurationProperty.cs: don't use null to mean no default value, use NoDefaultValue. 2005-10-11 Chris Toshok * KeyValueConfigurationCollection.cs (GetElementKey): duh. BaseGet calls GetElementKey, so we were hitting an infinite recursion here. Use BaseIndexOf instead. 2005-10-07 Chris Toshok * InternalConfigurationHost.cs: some interface work, adding in the new methods. * ConfigurationProperty.cs: remove debug spew. * Configuration.cs: add NIE'd NamespaceDeclared property. * ElementInformation.cs: add NIE'd Errors property. * PropertyInformationCollection.cs: add NIE'd GetObjectData(). * ConfigurationManager.cs: quite a bit of new work here. Some definie TODO's still though. 2005-10-07 Chris Toshok * ConfigurationErrorsException.cs (.ctor): for the (string) overload, chain up to the base (string) ctor. 2005-10-07 Chris Toshok * ConfigurationElement.cs (ElementMap.ReflectProperties): make sure the type of the default value is compatible with that of the property itself, and throw ConfigurationErrorsException if they don't match. Fixes t12. 2005-10-07 Chris Toshok * ConfigHelper.cs: remove some unused code. * ConfigurationProperty.cs: disambiguate the ctor we chain to. * ConfigurationElement.cs (ElementProperty): implement. (ElementMap.ReflectProperties): make DefaultValidator the default validator, not null. 2005-10-06 Chris Toshok * KeyValueConfigurationElement.cs: uncomment out some stuff. (Properties): just return base.Properties. Not sure why they override this, as the base class's implementation passes our test. * KeyValueConfigurationCollection.cs (Add): for the keyValue overload, call keyValue.Init as the unit test stack traces indicates that'9s where it's called. For the string,string overload, just call the keyValue overload instead of calling BaseAdd. (CreateNewElement): just use the name/value ctor, and specify "" for each. (GetElementKey): this function always returns "" for elements that haven't been added to the collection. Once theyre added, it seems to always return keyValue.Key. (Properties): the unit tests show this returns a 0 length collection. 2005-10-05 Chris Toshok * ConfigurationPermissionAttribute.cs: stub out. 2005-10-05 Chris Toshok * TimeSpanMinutesOrInfiniteConverter.cs: fill in the implementation. 2005-10-05 Chris Toshok * TimeSpanSecondsConverter.cs: new implementation. 2005-10-05 Chris Toshok * TimeSpanMinutesConverter.cs: flesh out implementation. * ConfigurationConverterBase.cs: make all subclasses work with strings only, since that's what seems to manifest itself in the tests. 2005-10-05 Chris Toshok * ConfigurationLockCollection.cs: add NIE'd AttributeList property. * ConfigurationConverterBase.cs: add MonoTODO'd CanConvertFrom and CanConvertTo methods. * ConfigurationSectionGroup.cs: add NIE'd IsDeclared property. * ProtectedConfigurationSection.cs: add NIE'd properties. * ConfigurationElementCollection.cs: add MonoTODO'd IsReadOnly and SetReadOnly methods, and have then chain up to the base class. * KeyValueConfigurationCollection.cs: add the class level ConfigurationCollectionAttribute, and add a NIE'ed Properties property. * ProviderSettingsCollection.cs: add the class level ConfigurationCollectionAttribute, and add a "new" keyword to the this property. Also, nuke the Provider's property. * SectionInformation.cs: add some NEI'd properties. * ConfigurationSection.cs (ResetModified): leave the MonoTODO, but chain up to base class's method instead of throwing NIE. * ConnectionStringSettingsCollection.cs: add the class-level ConfigurationCollectionAttribute, and add the unimplemented Properties property. * ConfigurationErrorsException.cs: flesh this out, and add a pragma to disable the obsolete warnings from our base class. * ProviderSettings.cs: add unimplemented Properties property. * ConfigurationElement.cs: remove unnecessary EvaluationInformation. * InternalConfigurationRoot.cs: add unimplemented IsDesignTime property. * ConfigurationProperty.cs: add a missing ctor. * AppSettingsSection.cs: add missing "override" keyword. * ConnectionStringsSection.cs: remove override. * ConfigurationSectionCollection.cs: AllKeys -> Keys, and add unimplemented GetObjectData override. * ConfigurationSectionGroupCollection.cs: same. * ConfigurationCollectionAttribute.cs: add missing CollectionType property. 2005-10-05 Chris Toshok * ConfigurationPermission.cs: new implementation. * IgnoreSection.cs: new implementation. 2005-10-05 Chris Toshok * CommaDelimitedStringCollection.cs: new implementation. 2005-10-05 Chris Toshok * NameValueConfigurationCollection.cs: new implementation. * NameValueConfigurationElement.cs: new implementation. 2005-10-05 Chris Toshok * ValidatorCallback.cs: new implementation. * SubclassTypeValidator.cs, SubclassTypeValidatorAttribute.cs: new implementation. * CallbackValidator.cs, CallbackValidatorAttribute.cs: new implementation. * RegexStringValidator.cs, RegexStringValidatorAttribute.cs: new implementation. * LongValidator.cs, LongValidatorAttribute.cs: new implementation. * IntegerValidator.cs, IntegerValidatorAttribute.cs: new implementation. * DefaultValidator.cs: new implementation. 2005-09-28 Chris Toshok * ConfigurationElementCollection.cs: more work on the "" handling - just skip the element for now. this causes a failure in one test ('' doesn't throw an exception when it should), but it succeeds for collections that have required attributes. * ConnectionStringSettings.cs: providerName isn't a required attribute. * AppSettingsSection.cs (.cctor): initialize our "file" Property. (File): implement. (Properties): fix. (GetRuntimeObject): call the base class method instead of just returning "this". * ConnectionStringsSection.cs: Add a hacky DeserializeElement method here (that isn't in MS's) for the time being so we actually deserialize our collection. 2005-09-28 Chris Toshok * KeyValueInternalCollection.cs: found this by way of a stack trace in one of the tests. A NameValueCollection that wraps a KeyValueConfigurationCollection. * Configuration.cs (Init): save off configPath. (EvaluationContext): new, mostly implemented. (GetSectionInstance): use IgnoreSection instead of RuntimeOnlySection. (Load): don't fail when we can't load a file. * IgnoreSection.cs: replace RuntimeOnlySection with this new public type. * RuntimeOnlySection.cs: nuke. 2005-09-27 Chris Toshok * TimeSpanMinutesOrInfiniteConverter.cs: this is sealed. 2005-09-27 Chris Toshok * ConfigurationProperty.cs: add IsDefaultCollection property. 2005-09-27 Chris Toshok * ConfigurationElementProperty.cs: new file. * ConfigurationLockCollection.cs: new file. * ConfigurationElementCollection.cs (OnDeserializeUnrecognizedElement): make sure we consume the element so we don't into an endless loop. * ConfigurationElement.cs: add a bunch of NIE's properties. * ContextInformation.cs: Add NIE'ed IsMachineLevel property. 2005-09-23 Chris Toshok * AppSettingsSection.cs: fix build and add a couple of TODO'ed properties. 2005-09-23 Chris Toshok * ProviderSettings.cs (Unmerge): track change to ConfigurationElement.Unmerge. * ConfigurationSection.cs: add functions nuked from ConfigurationElement here. * ConfigurationElementCollection.cs: add DebuggerDisplay attribute to the class. (BaseGetAllKeys): returns object[], not string[]. (BaseGetKey): returns object, not string. (Unmerge): track change to ConfigurationElement.Unmerge signature. * ConfigurationElement.cs (ConfigurationElement.Unmerge): fix signature (drop the serializeCollectionKey parameter). 2005-09-23 Chris Toshok * StringValidator.cs: throw ArgumentException instead of ConfigurationErrorsException. 2005-09-23 Chris Toshok * ConnectionStringsSection.cs: track change to ConfigurationPropertyOptions. * ConfigurationPropertyAttribute.cs, ConfigurationProperty.cs, ProviderSettings.cs: track change to ConfigurationPropertyOptions. * ConnectionStringSettings.cs: track change to ConfigurationProprertyOptions, and add some ConfigurationProperty attributes. * ConfigurationPropertyOptions.cs: DefaultCollection -> IsDefaultCollection, Required -> IsRequired. 2005-09-22 Chris Toshok * PositiveTimeSpanValidator.cs: this lives in System.Web.Configuration, not System.Configuration. 2005-09-22 Chris Toshok * TimeSpanValidator.cs: change to ArgumentException and alter the messages slightly. 2005-09-22 Chris Toshok * ExeConfigurationFileMap.cs (ctor): init all the strings to "". 2005-07-01 Lluis Sanchez Gual * ProviderSettings.cs: Implemented properties using property attributes. * ConfigurationElement.cs: Implemented ElementInformation property and moved there all value management. * ProtectedConfigurationProvider.cs: Set the correct base class. * SectionInformation.cs: Added missing AllowExeDefinition property. * TimeSpanValidatorAttribute.cs: Implemented. * StringValidator.cs: Implemented. * ProviderSettingsCollection.cs: Added missing class attribute. * ConfigurationSaveMode.cs: Fix enum values. * ConfigurationElementCollection.cs: Added Init method for initializing elements from properties. * StringValidatorAttribute.cs: Implemented. * ConfigurationLocation.cs: Added support for allowOverride flag. * TimeSpanMinutesOrInfiniteConverter.cs: Created skeleton class. * PositiveTimeSpanValidator.cs: Implemented. * TimeSpanMinutesConverter.cs: Created skeleton class. * SectionInfo.cs: Properly read, store and check the values of AllowLocation, AllowDefinition and AllowExeDefinition. * TimeSpanValidator.cs: Implemented. * ConfigurationConverterBase.cs: Created skeleton class. * InternalConfigurationHost.cs: Implemented IsDefinitionAllowed and VerifyDefinitionAllowed. * ConfigurationManager.cs: That class must be static. * PropertyInformationCollection.cs: Implemented. * Configuration.cs: Added some checks for AllowLocation, AllowDefinition and so on. In Save(), don't forget to save location elements. * ConfigurationProperty.cs: Keep track of collection attributes. * ConfigInfo.cs: Support overrideAllowed flag. * KeyValueConfigurationElement.cs: Define properties using attributes. * PropertyValueOrigin.cs: implemented. * PropertyInformation.cs: Mostly implemented. * SectionGroupInfo.cs: Properly propagate the overrideAllowed flag. * ElementInformation.cs: Mostly implemented. * ConfigurationPropertyAttribute.cs: Set the correct default value. * ConfigurationCollectionAttribute.cs: Implemented. 2005-06-23 Lluis Sanchez Gual * SectionInfo.cs: Set the config host when loading the section. * InternalConfigurationHost.cs: Implemented some basic methods. * Configuration.cs: Find the correct parent for the configuration, taking into accound locations and such. Use Host functions to get types from names. * ConfigurationLocationCollection.cs: Added find method. * ConfigInfo.cs: Added Host property. * InternalConfigurationFactory.cs: The InitForConfiguration calls are now done in each correspoding configuration. * SectionGroupInfo.cs: When reading a location element, create a Configuration object for each path specified in the location. * ConfigurationElementCollection.cs: Added the CreateNewElementInternal method, which properly initializes the created element. * ConfigurationLocation.cs: OpenConfiguration now has to read the xml contents. It also has to find the correct parent configuration, if it has not been specified. 2005-06-17 Lluis Sanchez Gual * SectionInfo.cs, ConfigInfo.cs, SectionGroupInfo.cs: Minor api fixes. * ConfigurationPropertyCollection.cs: Added Clear method. * ContextInformation.cs: Implemented. * ConfigurationManager.cs: Implemented some missing methods. Configuration objects are now created through the ConfigurationFactory. * InternalConfigurationHost.cs: Implementation of IInternalConfigHost to be used for exe files and machine.config. * ConfigurationFileMap.cs: Implemented. * Configuration.cs: Read and write config files using the methods that IInternalConfigHost provides. * InternalConfigurationRoot.cs: IInternalConfigRoot stub. * ExeContext.cs: Implemented. * AppSettingsSection.cs: Use the KeyValueConfigurationCollection collection to store values. * KeyValueConfigurationElement.cs: Implemented. * KeyValueConfigurationCollection.cs: Implemented. * InternalConfigurationFactory.cs: An implementation of IInternalConfigConfigurationFactory. * ConfigurationPropertyAttribute.cs: Added missing attributes. * ExeConfigurationFileMap.cs: Implemented. 2005-06-15 Lluis Sanchez Gual * ConfigurationElement.cs, ConfigurationErrorsException.cs SectionInfo.cs, ConnectionStringSettingsCollection.cs, ConfigurationPropertyCollection.cs, ProtectedConfigurationProvider.cs, ConfigurationSection.cs, NonEmptyStringConfigurationProperty.cs, ConfigurationElementCollectionType.cs, Configuration.cs, ConnectionStringSettings.cs, ConfigurationProperty.cs, ConfigurationLocationCollection.cs, TimeSpanConfigurationProperty.cs, ConfigurationAllowDefinition.cs, ConfigInfo.cs, ConfigurationSectionGroupCollection.cs, AppSettingsSection.cs, ProviderSettingsCollection.cs, IntegerConfigurationProperty.cs, SectionGroupInfo.cs, ConfigurationUserLevel.cs, ConnectionStringsSection.cs, ConfigurationPropertyAttribute.cs, ConfigurationLocation.cs, ConfigurationSectionCollection.cs, ConfigurationSectionGroup.cs, RuntimeOnlySection.cs, ProviderSettings.cs: Track API changes. * ConfigurationElementCollection.cs: Implemented support for Basic collection type. Other fixes. * ConfigurationPropertyFlags.cs: Renamed to ConfigurationPropertyOptions. * ConfigurationUpdateMode.cs: Renamed to ConfigurationSaveMode. * SectionInformation.cs, ConfigurationAllowExeDefinition.cs ConfigurationManager.cs, ConfigurationSaveMode.cs, ConfigurationValidatorAttribute.cs, ProtectedConfigurationSection.cs, ConfigurationValidatorBase.cs, ConfigurationPropertyOptions.cs: New files. * ConfigurationValidationAttribute.cs: Removed. * ProviderBase.cs: Moved to System.dll. 2005-06-14 Lluis Sanchez Gual * AppSettingsSection.cs, ConfigInfo.cs, Configuration.cs ConfigurationAllowDefinition.cs, ConfigurationElement.cs ConfigurationElementCollection.cs, ConfigurationElementCollectionType.cs ConfigurationLocation.cs, ConfigurationLocationCollection.cs ConfigurationProperty.cs, ConfigurationPropertyAttribute.cs ConfigurationPropertyCollection.cs, ConfigurationPropertyFlags.cs ConfigurationSection.cs, ConfigurationSectionCollection.cs ConfigurationSectionGroup.cs, ConfigurationSectionGroupCollection.cs ConfigurationUpdateMode.cs, ConfigurationUserLevel.cs ConfigurationValidationAttribute.cs, ConnectionStringsSection.cs ConnectionStringSettingsCollection.cs, ConnectionStringSettings.cs IntegerConfigurationProperty.cs, NonEmptyStringConfigurationProperty.cs NonEmptyStringFlags.cs, PathLevel.cs, ProtectedConfigurationProvider.cs ProviderBase.cs, ProviderSettings.cs, ProviderSettingsCollection.cs RuntimeOnlySection.cs, SectionInfo.cs, SectionGroupInfo.cs TimeSpanConfigurationProperty.cs, TimeSpanPropertyFlags.cs TimeSpanSerializedFormat.cs: Moved from the System assembly.