2006-01-09 Chris Toshok <toshok@ximian.com>
[mono.git] / mcs / class / System.Configuration / System.Configuration / ChangeLog
index 339a88b1f8eb3ef4dc27287b6262a8b175ca9e11..f0eb372b50321f7271a878098fb22b16d412dded 100644 (file)
@@ -1,3 +1,423 @@
+2006-01-09  Chris Toshok  <toshok@ximian.com>
+
+       * ElementInformation.cs (Validator): if propertyInfo == null,
+       return a DefaultValidator instance.
+
+2006-01-09  Chris Toshok  <toshok@ximian.com>
+
+       * AppSettingsSection.cs (.cctor): specify null for
+       validator/converter.
+
+       * ProtectedProviderSettings.cs (.cctor): specify null for
+       validator/converter.
+
+2006-01-03  Chris Toshok  <toshok@ximian.com>
+
+       * Configuration.cs (SaveAs): open with FileMode.OpenOrCreate so we
+       can save to a new file.
+       (CreateSection): don't bother to set the section information's
+       Name here.  we'll do it in SectionInfo.CreateInstance.
+
+       * ProtectedConfiguration.cs (Section): new static property so we
+       can remove all the GetSection calls.
+       (GetProvider): load a named provider, optionally throwing an
+       exception if it's not found.
+
+       * InternalConfigurationHost.cs (EncryptSection, DecryptSection):
+       make these private interface implementations, and call
+       protectedSection.{EncryptSection,DecryptSection}.
+
+       * ProtectedConfigurationSection.cs (EncryptSection,
+       DecryptSection): add these two calls.  They really shouldn't be
+       here, but I saw them in an MS stack trace and thought "why not?".
+
+       * ConfigurationSection.cs (SectionInformation): don't set
+       attributes here, that's done in SectionInfo.CreateInstance.
+       (DeserializeSection): shoehorn in the decryption stuff here.  It
+       doesn't belong here, and I've added a MonoTODO about it.  It
+       should live someplace like SectionInfo.ReadData (which would make
+       it similar to the encryption stuff in .WriteData).
+
+       * SectionInformation.cs (IsProtected): remove the special flag,
+       just return true if we have a non-null protection_provider.
+       (ProtectSection): do nothing but try to instantiate the named
+       provider.
+       (UnprotectSection): null out protection_provider.
+
+       * DpapiProtectedConfigurationProvider.cs: move the
+       NotSupportedExceptions to Decrypt/Encrypt so we don't bomb out
+       when parsing our machine.config file.
+
+       * RsaProtectedConfigurationProvider.cs: initial implementation.
+       much is missing (OAEP support, key importing, adding/deleting
+       keys), but it can be used.
+
+2006-01-02  Chris Toshok  <toshok@ximian.com>
+
+       * RsaProtectedConfigurationProvider.cs: implement the
+       CspProviderName and UseOAEP properties..
+
+2006-01-02  Chris Toshok  <toshok@ximian.com>
+
+       * ProtectedConfigurationSection.cs: flesh this out (and add logic
+       to instantiate providers, based on some of the standalone test
+       exception stack traces.)
+
+       * ProtectedConfiguration.cs: new implementation.
+
+       * ProtectedConfigurationProviderCollection.cs: new
+       implementation.
+
+       * ProtectedProviderSettings.cs: new implementation.
+
+       * ProtectedConfigurationProvider.cs: trim the superclass's name.
+
+       * RsaProtectedConfigurationProvider.cs: stubbed, unimplemented.
+
+       * DpapiProtectedConfigurationProvider.cs: add stubbed
+       implementation that throws NotSupportedException telling people
+       they should be using RsaProtectedConfigurationProvider.
+
+2006-01-02  Chris Toshok  <toshok@ximian.com>
+
+       * DefaultSection.cs (Properties): implement.
+
+       * IgnoreSection.cs: move from lazily creating the properties
+       collection to sharing a single one across all instances.
+
+       * ConfigurationLockCollection.cs (IsReadOnly): fix compiler warning.
+
+       * ConfigurationElementCollection.cs (BaseAdd) remove logic to
+       remove an old matching element.
+       (BaseGetKey): throw an exception if @index is out of range.
+
+       * SectionInformation.cs (SectionName): just return name, like Name
+       does.. redundant, but it matches tests.
+       (GetRawXml): implement.
+       (SetRawXml): implement.
+
+       * ConfigurationSection.cs (SectionInformation): fill in
+       sectionInformation.Type before returning.
+       (DeserializeSection): save off the raw xml to our
+       SectionInformation.
+
+       * ConfigurationElement.cs (LockItem): implement.
+       (DeserializeElement): add support for the "lockItem" attribute.
+
+2005-12-16  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationLockCollection.cs (Add): only add the name if it's
+       not already there.
+       (IsReadOnly): always return false for the time being, in the
+       non-exceptional case.
+
+2005-12-15  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationElement.cs (LockAllAttributesExcept): implement.
+       (LockAllElementsExcept): implement.
+       (DeserializeElement): handle the built-in attributes (lock* for
+       the time being).
+
+2005-12-15  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationLockCollection.cs (..ctor): don't call Populate.
+       (Populate): nuke.
+       (CheckName): make sure the passes in name is valid for this type
+       of lock collection.
+       (Add): call CheckName, and set is_modified to true.
+       (Clear): set is_modified.
+       (IsReadOnly): add plausable implementation, including exception in
+       the case where the name isn't found.
+       (Remove): set is_modified.
+       (SetFromList): implement.
+       (get_AttributeList): implement.
+       (set_IsModified): add internal setter so we can clear the modified
+       flag.
+
+2005-12-12  Chris Toshok  <toshok@ximian.com>
+
+       * AppSettingsSection.cs (DeserializeElement): provide rather naive
+       version of the file="" handling.  It's enough to make our tests
+       pass.
+
+2005-12-11  Chris Toshok  <toshok@ximian.com>
+
+       * ConnectionStringsSection.cs (..cctor): use "" instead of null
+       for the name of the default collection.
+
+       * AppSettingsSection.cs (..cctor): create a property for the
+       default collection.
+       (DeserializeElement): call base.DeserializeElement.
+       (File): index off the property, not the name.
+       (Settings): don't use an private variable here, use
+       base[_propSettings].
+
+       * ConfigurationManager.cs (GetSection): GetEntryAssembly returns
+       null for new app domains.  so deal with this by calling
+       GetCallingAssembly if it's null.  This is probably still wrong but
+       it doesn't NRE in xsp2.
+       (AppSettings): remove MonoTODO.
+       
+       * KeyValueConfigurationElement.cs (..ctor): new method, create the
+       ConfigurationProperty's and the collection here.
+       (.ctor): add internal arg-less ctor.
+       (Key): use keyProp instead of "key".
+       (Value): use vlaueProp instead of "value".
+       (Properties): return our class's properties.
+
+       * KeyValueConfigurationCollection.cs (CreateNewElement): use the
+       arg-less ctor.
+       (GetElementKey): re-enable the BaseIndexOf test.
+
+2005-12-02  Chris Toshok  <toshok@ximian.com>
+
+       * Configuration.cs (Save): call WriteStartDocument.
+
+       * ConnectionStringSettingsCollection.cs (CreateNewElement): use
+       parameter-less ctor to keep from generating exceptions when using
+       the collection.
+
+2005-12-02  Chris Toshok  <toshok@ximian.com>
+
+       * ConnectionStringSettings.cs: tabify, fix default values, and add
+       a string validator for "name".
+
+2005-12-02  Chris Toshok  <toshok@ximian.com>
+
+       * 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 "<!-- dd -->" output.
+
+2005-11-28  Chris Toshok  <toshok@ximian.com>
+
+       * ProviderSettings.cs: use ConfigurationProperty's to implement
+       the properties.
+
+2005-11-24  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationProperty.cs (Validate): add internal method.
+
+2005-11-24  Chris Toshok  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * PositiveTimeSpanValidatorAttribute.cs: new implementation.
+
+       * PositiveTimeSpanValidator.cs: new implementation.
+
+2005-10-24  Chris Toshok  <toshok@ximian.com>
+
+       * TimeSpanSecondsOrInfiniteConverter.cs: new implementation.
+
+       * TypeNameConverter.cs: new implementation.
+
+       * WhiteSpaceTrimStringConverter.cs: new implementation.
+
+2005-10-24  Chris Toshok  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * AppSettingsSection.cs (Settings): fix ConfigurationProperty
+       attribute.
+
+       * ProtectedConfigurationSection.cs (Providers): same.
+
+2005-10-12  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationPermission.cs: flesh out as per tests.
+
+2005-10-11  Chris Toshok  <toshok@ximian.com>
+
+       * ConfigurationProperty.cs: don't use null to mean no default
+       value, use NoDefaultValue.
+
+2005-10-11  Chris Toshok  <toshok@ximian.com>
+
+       * KeyValueConfigurationCollection.cs (GetElementKey): duh.
+       BaseGet calls GetElementKey, so we were hitting an infinite
+       recursion here.  Use BaseIndexOf instead.
+
+2005-10-07  Chris Toshok  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * ConfigurationErrorsException.cs (.ctor): for the (string)
+       overload, chain up to the base (string) ctor.
+
+2005-10-07  Chris Toshok  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * 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  <toshok@ximian.com>
+
+       * ConfigurationPermissionAttribute.cs: stub out.
+
+2005-10-05  Chris Toshok  <toshok@ximian.com>
+
+       * TimeSpanMinutesOrInfiniteConverter.cs: fill in the
+       implementation.
+
 2005-10-05  Chris Toshok  <toshok@ximian.com>
 
        * TimeSpanSecondsConverter.cs: new implementation.