1 2007-06-18 Atsushi Enomoto <atsushi@ximian.com>
3 * ClientConfigurationSystem.cs : do not asume GetEntryAssembly()
4 returns non-null. Patch by Patrick Perry.
6 2007-06-13 Atsushi Enomoto <atsushi@ximian.com>
8 * ConfigurationElement.cs : SerializeToXmlElement() should be
9 called regardless of HasValues() return value, especially since
10 it could be overriden (e.g. in SettingsValueElement).
12 2007-06-13 Atsushi Enomoto <atsushi@ximian.com>
14 * ConfigurationSectionGroup.cs
15 Configuration.cs : ConfigurationSectionGroup must be initialized
16 at least when being added to a collection.
18 2007-06-12 Vladimir Krasnov <vladimirk@mainsoft.com>
20 * ConfigurationElement.cs: refactored GetKeyProperties and
21 GetDefaultCollection methods, map should not be used here, Properties
22 will do instead. Refactored ElementMap class
23 * ConfigurationElementCollection.cs: fixed InitFromProperty, GetMap()
24 should not be called here
25 * ElementInformation.cs: fixed Properties, moved to ctor to be thread
27 * PropertyInformation.cs: members assigned readonly modifier
29 2007-05-30 Marek Habersack <mhabersack@novell.com>
31 * SectionGroupInfo.cs: <location> elements are case-insensitive
32 and the same 'path' attribute may be used only once.
34 * ConfigurationLocationCollection.cs: Find should be
35 case-insensitive for all targets, not just TARGET_JVM.
37 2007-05-17 Igor Zelmanovich <igorz@mainsoft.com>
39 * Configuration.cs: FilePath implemented according to MSDN:
40 If the value for this FilePath property represents a merged view and
41 no actual file exists for the application, the path to the parent
42 configuration file is returned.
44 2007-05-15 Igor Zelmanovich <igorz@mainsoft.com>
47 * ConfigurationLocation.cs:
48 implemented EvaluationContext property.
50 2007-05-15 Igor Zelmanovich <igorz@mainsoft.com>
52 * ConfigurationLocationCollection.cs: for TARGET_JVM only:
53 location path is case-insensitive.
55 2007-05-15 Marek Habersack <mhabersack@novell.com>
57 * ConfigurationElement.cs: added value validation on
58 deserialization from the config file.
60 2007-05-14 Igor Zelmanovich <igorz@mainsoft.com>
62 * ConfigurationElement.cs: when attribute value cannot be parsed,
63 ConfigurationErrorException is thrown.
65 2007-05-09 Igor Zelmanovich <igorz@mainsoft.com>
67 * ConfigurationManager.cs:
68 added MonoLimitation attribute for TARGATE_JVM.
70 2007-05-08 Igor Zelmanovich <igorz@mainsoft.com>
72 * ConnectionStringSettingsCollection.cs: removed 'new' keyword, cause
73 property doesn't hide any inherit property.
75 2007-04-24 Atsushi Enomoto <atsushi@ximian.com>
77 * InternalConfigurationHost.cs : machine configuration covers all
78 ConfigurationAllowDefinition values.
80 2007-04-17 Atsushi Enomoto <atsushi@ximian.com>
82 * ConfigurationSectionCollection.cs : GetEnumerator() should return
83 IEnumerator for the items, not keys.
84 * ConfigurationProperty.cs : more helpful type mismatch message.
86 2007-04-16 Marek Habersack <mhabersack@novell.com>
88 * SectionGroupInfo.cs: another (and final, hopefully) fix for bug
89 #81321 and several other related issues that were discovered by
90 the way. Thanks to Atsushi for help with XmlReader!
92 2007-04-15 Marek Habersack <mhabersack@novell.com>
94 * SectionGroupInfo.cs: another incarnation of the fix for bug
97 2007-04-12 Marek Habersack <mhabersack@novell.com>
99 * SectionGroupInfo.cs: a better fix for #81321
101 2007-04-10 Marek Habersack <mhabersack@novell.com>
103 * SectionGroupInfo.cs: make sure empty sections with the
104 short-circuit tag ends (<section/>) don't make the process loop
105 endlessly. Fixes bug #81321.
107 2007-03-22 Konstantin Triger <kostat@mainsoft.com>
109 * ConfigInfo.cs: should be able instantiate types with private ctors.
111 2007-03-19 Vladimir Krasnov <vladimirk@mainsoft.com>
113 * ConfigurationSectionCollection.cs,
114 * ConfigurationSectionGroupCollection.cs,
115 * PropertyInformationCollection.cs,
116 * SectionGroupInfo.cs: used StringComparer.Ordinal instead of
119 2007-03-15 Vladimir Krasnov <vladimirk@mainsoft.com>
121 * ConfigurationSectionCollection.cs,
122 * ConfigurationSectionGroupCollection.cs,
123 * PropertyInformationCollection.cs,
124 * SectionGroupInfo.cs: these collections should be based on case
125 insensitive NameObjectCollectionBase
126 * added OrdinalComparer.cs for use in NameObjectCollectionBase
128 2007-02-07 Atsushi Enomoto <atsushi@ximian.com>
130 * SectionInfo.cs : don't stop at restartOnExternalChanges attribute.
132 2007-01-16 Konstantin Triger <kostat@mainsoft.com>
134 * ConfigurationElement.cs: ignore properties with null or empty name.
136 2007-01-16 Konstantin Triger <kostat@mainsoft.com>
138 * ConfigurationElement.cs: Try to deserilalize an unrecognized element by
139 current element, and only if failed delegate to default collection.
141 2006-12-27 Vladimir Krasnov <vladimirk@mainsoft.com>
143 * ConfigurationElementCollection.cs: fixed BaseAdd, looking for
144 identical element when collection type is not alternate
146 2006-12-27 Vladimir Krasnov <vladimirk@mainsoft.com>
148 * ConnectionStringSettingsCollection.cs: made connection string key
151 2006-12-27 Atsushi Enomoto <atsushi@ximian.com>
153 * ConfigurationElementCollection.cs : fixed BaseAdd() with
154 throwIfExists to not raise an error for identical element
155 but for different element which shares the same key. Fix by
158 2006-12-21 Vladimir Krasnov <vladimirk@mainsoft.com>
160 * ConfigurationProperty.cs: fixed DefaultValue of type Enum
162 2006-12-10 Konstantin Triger <kostat@mainsoft.com>
164 * ConfigurationElement.cs: Delegate parameter checking and default
165 assigning to Configuratin property.
166 * ConfigurationProperty.cs:
167 Ensure the TypeConvert and Validator always exist.
168 Ensure the primitive types are properly initialized.
170 2006-12-09 Vladimir Krasnov <vladimirk@mainsoft.com>
172 * ConfigurationElementCollection.cs
173 * ConfigurationRemoveElement.cs: fixed key for <remove> element in
174 ConfigurationRemoveElement class
176 2006-11-28 Marek Habersack <grendello@gmail.com>
178 * SectionGroupInfo.cs: Implement merging of section groups with
179 the same names and parents.
181 * ConfigInfo.cs: Add an abstract method for merging sections.
183 * SectionInfo.cs: Add implementation of an abstract base method
185 2006-08-23 Konstantin Triger <kostat@mainsoft.com>
187 * SectionInfo.cs: refactoring - remove unneeded bool? usage.
189 2006-11-05 Vladimir Krasnov <vladimirk@mainsoft.com>
191 * added: ConfigurationRemoveElement.cs, common element for <remove>
192 * ConnectionStringSettingsCollection.cs: reverted last fix for
194 * ConfigurationElementCollection.cs: fixed the way that
195 OnDeserializeUnrecognizedElement method handles <remove> element
197 2006-11-02 Vladimir Krasnov <vladimirk@mainsoft.com>
199 * ConfigurationElement.cs: typo in DefaultCollectionProperty
202 2006-10-30 Joel Reed <joel.reed@ddiworld.com>
204 * NameValueConfigurationCollection.cs: Implement the Properties
207 2006-08-23 Konstantin Triger <kostat@mainsoft.com>
209 * ConfigurationLocation.cs: do not read root element, correctly close stream.
210 * Configuration.cs: use ReadData for nested content to throw if location
211 elements are encounterd.
212 In constructor taking parent Configurqation: do not call Init and so avoid
213 rereading config file.
215 2006-09-05 Vladimir Krasnov <vladimirk@mainsoft.com>
217 * NameValueConfigurationElement.cs: fixed functionality
218 * ConfigurationElementCollection.cs,
219 ConnectionStringSettingsCollection.cs: fixed <remove> element in
220 connectionStrings section
222 2006-08-23 Konstantin Triger <kostat@mainsoft.com>
224 * ConfigurationSection.cs: for net 1.1 SectionHandlers: return null in case
225 RawXml is null, as net 1.1 does.
227 2006-08-17 Vladimir Krasnov <vladimirk@mainsoft.com>
229 * ConfigurationFileMap.cs: added TARGET_JVM on not supported members
232 2006-07-07 Atsushi Enomoto <atsushi@ximian.com>
234 * ConfigurationManager.cs : OpenExeConfiguration(null) should still
235 work. This is required for embedded scenario.
237 2006-06-10 Atsushi Enomoto <atsushi@ximian.com>
239 * SectionGroupInfo.cs : skip <dllmap> in configuration.
241 2006-05-14 Atsushi Enomoto <atsushi@ximian.com>
243 * ConfigurationManager.cs: since ConfigurationSystem is different
244 for web.config, cast from ConfigurationSection to runtime object
245 should be done at GetSection().
246 This really fixed bug #78372.
248 2006-05-12 Atsushi Enomoto <atsushi@ximian.com>
250 * Configuration.cs : configPath is null for machine.config, so don't
251 use it. Use streamName instead. To my understanding, this should
254 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
256 * ConnectionStringSettings.cs : it seems that "name" property
257 could be null i.e. there is no StringValidator.
258 * StringValidator.cs : allow null.
260 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
262 * ConfigurationManager.cs : use GetCallingAssembly() instead of
263 GetEntryAssembly() which possibly returns null (e.g. nunit) in
264 OpenExeConfiguration(). Several nunit test failures are gone.
266 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
268 * ConnectionStringSettings.cs : oops, this API fix broke standalone
271 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
273 * ConfigurationElement.cs,
274 ConfigurationErrorsException.cs,
275 ConfigurationUserLevel.cs,
276 ConfigurationPropertyOptions.cs,
277 ConnectionStringSettings.cs : assorted minor corcompare fixes.
279 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
281 * Configuration.cs : some kind of refactoring is absolutely needed
282 here. Reuse RawXml from parentSection when data was not available
283 on current section. This should fix bug #78353.
285 2006-05-10 Atsushi Enomoto <atsushi@ximian.com>
287 * ConfigurationElement.cs,
289 in some cases RawXml was set null string, so skip such cases.
290 * Configuration.cs : support IConfigurationSectionHandler here.
291 * ConfigurationManager.cs : GetSection() now returns name value
292 collection, not a section.
293 * ConfigurationSection.cs : added SectionHandler for
294 IConfigurationSectionHandler support, and use its Create() in
296 * ClientConfigurationSystem.cs :
297 use GetRuntimeObject() in GetSection(). Thus now
298 ConfigurationManager.GetSection() returns a runtime object.
301 2006-04-28 Atsushi Enomoto <atsushi@ximian.com>
303 * SectionGroupInfo.cs :
304 sections which are defined in sectionGroups could be directly
305 referenced, so search corresponding section recursively.
306 * DefaultSection.cs : It does not reject unrecognized contents.
308 2006-04-26 Chris Toshok <toshok@ximian.com>
310 * SectionInformation.cs (.ctor): add MonoTODO about the default
311 value for require_permission.
312 (RequirePermission): implement the getter/setter for this so
313 Atsushi's previous commit doesn't break everything :)
315 2006-04-26 Atsushi Enomoto <atsushi@ximian.com>
318 SectionInfo.cs : added support for "requirePermission" attribute
319 in "section" element. This fixes bug #77957.
321 2006-04-25 Chris Toshok <toshok@ximian.com>
323 * ConfigurationElementCollection.cs (Reset): it makes no sense to
324 pass the typename to CreateNewElementInternal. the argument is
325 the elementname. pass null instead.
328 2006-02-01 Atsushi Enomoto <atsushi@ximian.com>
330 * ConfigurationElement.cs : ListErrors() and SetPropertyValue()
332 * ConfigurationSection.cs : the .ctor() is protected.
333 * ConfigurationElementCollection.cs : CollectionType is public.
334 Count and BaseAdd() are not virtual.
335 * ConfigurationPropertyCollection.cs : Count is not virtual.
337 2006-02-01 Chris Toshok <toshok@ximian.com>
339 * ConfigurationElement.cs: revert the patch that stores and writes
340 out xmlns attributes for all elements.
342 * ClientConfigurationSystem.cs: SupportsUserConfig == false.
344 * AppSettingsSection.cs (GetRuntimeObject): call col.SetReadOnly()
345 only if SupportsUserConfig != true.
347 * ConfigurationManager.cs (ConfigurationSystem): add a property
348 like ConfigurationFactory, and use it instead of the private field
351 2006-01-26 Chris Toshok <toshok@ximian.com>
353 * SectionGroupInfo.cs (ReadContent): handle "location" (seemingly)
356 * InternalConfigurationRoot.cs: misc logical additions. still
359 * ConfigurationManager.cs (OpenExeConfigurationInternal): throw an
360 exception if both calling_assembly and exePath are null. Allow
361 the exePath to be a path to a config file as well, checking to see
362 if it ends in .config before appending.
363 (OpenExeConfiguration): stop blindly passing
364 Assembly.GetCallingAssembly. I'm assuming this will likely break
365 .dll.config usage. need to investigate that (and write more unit
367 (GetSection): call configSystem.GetSection.
368 (RefreshSection): call configSystem.RefreshSection.
369 (ChangeConfigurationSystem): modeled after the
370 ConfigurationSettings System.Web hack - allow
371 WebConfigurationManager to replace the current
372 IInternalConfigSystem.
374 * InternalConfigurationHost.cs (InternalConfigurationHost): make
375 abstract, and remove all the NotImplenmentedException's.
377 * ConfigurationElement.cs (DeserializeElement): store off the xml
378 namespace if there is one.
379 (SerializeElement): write out the namespace if there was one.
381 * ClientConfigurationSystem.cs: new class, based on some stack
382 traces I've seen in tests. Kinda (well, not *kinda*..) hacky.
384 * Configuration.cs (NamespaceDeclared): implement.
385 (Load): don't swallow all exceptions, just the ones raised when we
386 open the stream for reading.
387 (ReadConfigFile): handle xmlns.
389 2006-01-25 Chris Toshok <toshok@ximian.com>
391 * ConfigInfo.cs (ThrowException): throw a
392 ConfigurationErrorsException, not a ConfigurationException.
394 * SectionGroupInfo.cs (ReadContent): throw an exception
395 unconditionally if we see a <location>. they aren't valid in
398 2006-01-25 Chris Toshok <toshok@ximian.com>
400 * KeyValueInternalCollection.cs: don't use a nested collection,
401 just defer to our base class. This fixes usage of
402 ConfigurationManager.AppSettings.Keys.
404 2006-01-13 Chris Toshok <toshok@ximian.com>
406 * AppSettingsSection.cs (GetRuntimeObject): only access
407 Settings[key] once per iteration.
409 2006-01-09 Chris Toshok <toshok@ximian.com>
411 * ConfigurationManager.cs (AppSettings): just return
412 AppSettingsSection.GetRuntimeObject() here.
414 * AppSettingsSection.cs: fix the "file" property to match dumper
416 (GetRuntimeObject): this returns a KeyValueInternalCollection in
419 2006-01-09 Chris Toshok <toshok@ximian.com>
421 * ElementInformation.cs (Validator): if propertyInfo == null,
422 return a DefaultValidator instance.
424 2006-01-09 Chris Toshok <toshok@ximian.com>
426 * AppSettingsSection.cs (.cctor): specify null for
429 * ProtectedProviderSettings.cs (.cctor): specify null for
432 2006-01-03 Chris Toshok <toshok@ximian.com>
434 * Configuration.cs (SaveAs): open with FileMode.OpenOrCreate so we
435 can save to a new file.
436 (CreateSection): don't bother to set the section information's
437 Name here. we'll do it in SectionInfo.CreateInstance.
439 * ProtectedConfiguration.cs (Section): new static property so we
440 can remove all the GetSection calls.
441 (GetProvider): load a named provider, optionally throwing an
442 exception if it's not found.
444 * InternalConfigurationHost.cs (EncryptSection, DecryptSection):
445 make these private interface implementations, and call
446 protectedSection.{EncryptSection,DecryptSection}.
448 * ProtectedConfigurationSection.cs (EncryptSection,
449 DecryptSection): add these two calls. They really shouldn't be
450 here, but I saw them in an MS stack trace and thought "why not?".
452 * ConfigurationSection.cs (SectionInformation): don't set
453 attributes here, that's done in SectionInfo.CreateInstance.
454 (DeserializeSection): shoehorn in the decryption stuff here. It
455 doesn't belong here, and I've added a MonoTODO about it. It
456 should live someplace like SectionInfo.ReadData (which would make
457 it similar to the encryption stuff in .WriteData).
459 * SectionInformation.cs (IsProtected): remove the special flag,
460 just return true if we have a non-null protection_provider.
461 (ProtectSection): do nothing but try to instantiate the named
463 (UnprotectSection): null out protection_provider.
465 * DpapiProtectedConfigurationProvider.cs: move the
466 NotSupportedExceptions to Decrypt/Encrypt so we don't bomb out
467 when parsing our machine.config file.
469 * RsaProtectedConfigurationProvider.cs: initial implementation.
470 much is missing (OAEP support, key importing, adding/deleting
471 keys), but it can be used.
473 2006-01-02 Chris Toshok <toshok@ximian.com>
475 * RsaProtectedConfigurationProvider.cs: implement the
476 CspProviderName and UseOAEP properties..
478 2006-01-02 Chris Toshok <toshok@ximian.com>
480 * ProtectedConfigurationSection.cs: flesh this out (and add logic
481 to instantiate providers, based on some of the standalone test
482 exception stack traces.)
484 * ProtectedConfiguration.cs: new implementation.
486 * ProtectedConfigurationProviderCollection.cs: new
489 * ProtectedProviderSettings.cs: new implementation.
491 * ProtectedConfigurationProvider.cs: trim the superclass's name.
493 * RsaProtectedConfigurationProvider.cs: stubbed, unimplemented.
495 * DpapiProtectedConfigurationProvider.cs: add stubbed
496 implementation that throws NotSupportedException telling people
497 they should be using RsaProtectedConfigurationProvider.
499 2006-01-02 Chris Toshok <toshok@ximian.com>
501 * DefaultSection.cs (Properties): implement.
503 * IgnoreSection.cs: move from lazily creating the properties
504 collection to sharing a single one across all instances.
506 * ConfigurationLockCollection.cs (IsReadOnly): fix compiler warning.
508 * ConfigurationElementCollection.cs (BaseAdd) remove logic to
509 remove an old matching element.
510 (BaseGetKey): throw an exception if @index is out of range.
512 * SectionInformation.cs (SectionName): just return name, like Name
513 does.. redundant, but it matches tests.
514 (GetRawXml): implement.
515 (SetRawXml): implement.
517 * ConfigurationSection.cs (SectionInformation): fill in
518 sectionInformation.Type before returning.
519 (DeserializeSection): save off the raw xml to our
522 * ConfigurationElement.cs (LockItem): implement.
523 (DeserializeElement): add support for the "lockItem" attribute.
525 2005-12-16 Chris Toshok <toshok@ximian.com>
527 * ConfigurationLockCollection.cs (Add): only add the name if it's
529 (IsReadOnly): always return false for the time being, in the
530 non-exceptional case.
532 2005-12-15 Chris Toshok <toshok@ximian.com>
534 * ConfigurationElement.cs (LockAllAttributesExcept): implement.
535 (LockAllElementsExcept): implement.
536 (DeserializeElement): handle the built-in attributes (lock* for
539 2005-12-15 Chris Toshok <toshok@ximian.com>
541 * ConfigurationLockCollection.cs (..ctor): don't call Populate.
543 (CheckName): make sure the passes in name is valid for this type
545 (Add): call CheckName, and set is_modified to true.
546 (Clear): set is_modified.
547 (IsReadOnly): add plausable implementation, including exception in
548 the case where the name isn't found.
549 (Remove): set is_modified.
550 (SetFromList): implement.
551 (get_AttributeList): implement.
552 (set_IsModified): add internal setter so we can clear the modified
555 2005-12-12 Chris Toshok <toshok@ximian.com>
557 * AppSettingsSection.cs (DeserializeElement): provide rather naive
558 version of the file="" handling. It's enough to make our tests
561 2005-12-11 Chris Toshok <toshok@ximian.com>
563 * ConnectionStringsSection.cs (..cctor): use "" instead of null
564 for the name of the default collection.
566 * AppSettingsSection.cs (..cctor): create a property for the
568 (DeserializeElement): call base.DeserializeElement.
569 (File): index off the property, not the name.
570 (Settings): don't use an private variable here, use
573 * ConfigurationManager.cs (GetSection): GetEntryAssembly returns
574 null for new app domains. so deal with this by calling
575 GetCallingAssembly if it's null. This is probably still wrong but
576 it doesn't NRE in xsp2.
577 (AppSettings): remove MonoTODO.
579 * KeyValueConfigurationElement.cs (..ctor): new method, create the
580 ConfigurationProperty's and the collection here.
581 (.ctor): add internal arg-less ctor.
582 (Key): use keyProp instead of "key".
583 (Value): use vlaueProp instead of "value".
584 (Properties): return our class's properties.
586 * KeyValueConfigurationCollection.cs (CreateNewElement): use the
588 (GetElementKey): re-enable the BaseIndexOf test.
590 2005-12-02 Chris Toshok <toshok@ximian.com>
592 * Configuration.cs (Save): call WriteStartDocument.
594 * ConnectionStringSettingsCollection.cs (CreateNewElement): use
595 parameter-less ctor to keep from generating exceptions when using
598 2005-12-02 Chris Toshok <toshok@ximian.com>
600 * ConnectionStringSettings.cs: tabify, fix default values, and add
601 a string validator for "name".
603 2005-12-02 Chris Toshok <toshok@ximian.com>
605 * CommaDelimitedStringCollectionConverter.cs (ConvertTo): change
606 the type check away from an exact check for
607 CommaDelimitedStringCollection to an assignable test from
608 StringCollection. This is due to the fact that AuthorizationRule
609 doesn't create CommaDelimitedStringCollections, for some odd
610 reason. It uses StringCollections.
612 * PropertyInformation.cs (Value): remove the case for
613 IsDefaultCollection - it's not necessary, as the property is an
616 * ConnectionStringSettings.cs: fix formatting and remove some
619 * ConnectionStringSettingsCollection.cs: same.
621 * ConnectionStringsSection.cs: same.
623 * ConfigurationElement.cs (SerializeToXmlElement): don't write the
624 enclosing start/end elements if the elementName is null or "".
625 this fixes the case for the DefaultCollections (at least in the
626 case of connectionStrings).
628 * IgnoreSection.cs (Properties): remove the MonoTODO.
630 * SectionInfo.cs (WriteData): remove the "<!-- dd -->" output.
632 2005-11-28 Chris Toshok <toshok@ximian.com>
634 * ProviderSettings.cs: use ConfigurationProperty's to implement
637 2005-11-24 Chris Toshok <toshok@ximian.com>
639 * ConfigurationProperty.cs (Validate): add internal method.
641 2005-11-24 Chris Toshok <toshok@ximian.com>
643 * ConfigurationElement.cs (ElementProperty): make this protected
644 internal virtual instead of public.
645 (SetPropertyValue): add a validator call and a blurb about the
646 code based on information gleaned from tests.
647 (set_Item (string)): call SetPropertyValue in the setter.
649 2005-11-14 Chris Toshok <toshok@ximian.com>
651 * CommaDelimitedStringCollection.cs: reformat things a bit, and
652 flag ToString() as override.
654 * DefaultSection.cs: new stubbed out implementation.
656 * CommaDelimitedStringCollectionConverter.cs: new implementation.
658 2005-11-10 Chris Toshok <toshok@ximian.com>
660 * AppSettingsSection.cs (DeserializeElement): stop explicitly
661 calling Settings.DeserializeElement, as the DefaultCollection
664 * ConfigurationElement.cs (DeserializeElement): rework the loop
665 here so that we actually loop over all the content elements.
667 2005-11-09 Chris Toshok <toshok@ximian.com>
669 * ConfigurationElement.cs: Add support for DefaultCollection
672 * PropertyInformation.cs (PropertyInformation.Value): add case for
675 * SectionGroupInfo.cs (SectionGroupInfo.ReadConfig): when we read
676 a "type" attribute, make sure the cached System.Type is cleared.
678 2005-10-25 Chris Toshok <toshok@ximian.com>
680 * InfiniteTimeSpanConverter.cs: new implementation.
682 * InfiniteIntConverter.cs: new implementation.
684 * GenericEnumConverter.cs: new implementation.
686 * Configuration.cs: we don't need to check with "is" after we use
687 "as".. just check for null-ness.
689 * KeyValueConfigurationCollection.cs: GetElementKey should throw
690 NRE if element == null.
692 * CommaDelimitedStringCollection.cs: raise the correct exceptions
693 in the read only case, and return null from ToString if there are
696 2005-10-25 Chris Toshok <toshok@ximian.com>
698 * PositiveTimeSpanValidatorAttribute.cs: new implementation.
700 * PositiveTimeSpanValidator.cs: new implementation.
702 2005-10-24 Chris Toshok <toshok@ximian.com>
704 * TimeSpanSecondsOrInfiniteConverter.cs: new implementation.
706 * TypeNameConverter.cs: new implementation.
708 * WhiteSpaceTrimStringConverter.cs: new implementation.
710 2005-10-24 Chris Toshok <toshok@ximian.com>
712 * AppSettingsSection.cs (DeserializeElement, SerializeSection):
713 split the behavior based on if File == "". If it is, we do the
714 default. otherwise we throw NIE.
716 * ConnectionStringsSection.cs (DeserializeElement): we shouldn't
717 need this, but we do until the IsDefaultCollection stuff is fixed.
719 * ConfigurationElementCollection.cs
720 (OnDeserializeUnrecognizedElement): for clearElementName, make
721 sure we have no attributes.
723 * ConnectionStringSettingsCollection.cs (get_Properties): for now
724 just chain up to base.Properties.
726 * ConfigurationElement.cs (ReflectProperties): do the default
727 value/property type check in a more robust way, using
730 2005-10-24 Chris Toshok <toshok@ximian.com>
732 * ConfigurationElement.cs: treat
733 ConfigurationProperty.NoDefaultValue the same as null when we're
734 checking the default value's type. this fixes t13 and 14.
736 * ConnectionStringsSection.cs (ConnectionStrings): fix the
737 DefaultValue in the ConfigurationPropertyAttribute.
739 2005-10-24 Chris Toshok <toshok@ximian.com>
741 * KeyValueConfigurationCollection.cs (GetElementKey): sacrifice
742 one test to get another working. Return a valid key even if the
743 element is not in this collection.
744 (get_ThrowOnDuplicate): return false.
746 * ConfigurationElementCollection.cs (BaseAdd): if we're adding an
747 element with the same key, overwrite the old one (remove the old
748 one after inserting the new one). Also, re-enable the throwing of
749 exceptions if ThrowOnDuplicate == true.
751 2005-10-24 Chris Toshok <toshok@ximian.com>
753 * AppSettingsSection.cs (Settings): fix ConfigurationProperty
756 * ProtectedConfigurationSection.cs (Providers): same.
758 2005-10-12 Chris Toshok <toshok@ximian.com>
760 * ConfigurationPermission.cs: flesh out as per tests.
762 2005-10-11 Chris Toshok <toshok@ximian.com>
764 * ConfigurationProperty.cs: don't use null to mean no default
765 value, use NoDefaultValue.
767 2005-10-11 Chris Toshok <toshok@ximian.com>
769 * KeyValueConfigurationCollection.cs (GetElementKey): duh.
770 BaseGet calls GetElementKey, so we were hitting an infinite
771 recursion here. Use BaseIndexOf instead.
773 2005-10-07 Chris Toshok <toshok@ximian.com>
775 * InternalConfigurationHost.cs: some interface work, adding in the
778 * ConfigurationProperty.cs: remove debug spew.
780 * Configuration.cs: add NIE'd NamespaceDeclared property.
782 * ElementInformation.cs: add NIE'd Errors property.
784 * PropertyInformationCollection.cs: add NIE'd GetObjectData().
786 * ConfigurationManager.cs: quite a bit of new work here. Some
787 definie TODO's still though.
789 2005-10-07 Chris Toshok <toshok@ximian.com>
791 * ConfigurationErrorsException.cs (.ctor): for the (string)
792 overload, chain up to the base (string) ctor.
794 2005-10-07 Chris Toshok <toshok@ximian.com>
796 * ConfigurationElement.cs (ElementMap.ReflectProperties): make
797 sure the type of the default value is compatible with that of the
798 property itself, and throw ConfigurationErrorsException if they
799 don't match. Fixes t12.
801 2005-10-07 Chris Toshok <toshok@ximian.com>
803 * ConfigHelper.cs: remove some unused code.
805 * ConfigurationProperty.cs: disambiguate the ctor we chain to.
807 * ConfigurationElement.cs (ElementProperty): implement.
808 (ElementMap.ReflectProperties): make DefaultValidator the default
811 2005-10-06 Chris Toshok <toshok@ximian.com>
813 * KeyValueConfigurationElement.cs: uncomment out some stuff.
814 (Properties): just return base.Properties. Not sure why they
815 override this, as the base class's implementation passes our test.
817 * KeyValueConfigurationCollection.cs (Add): for the keyValue
818 overload, call keyValue.Init as the unit test stack traces
819 indicates that'9s where it's called. For the string,string
820 overload, just call the keyValue overload instead of calling
822 (CreateNewElement): just use the name/value ctor, and specify ""
824 (GetElementKey): this function always returns "" for elements that
825 haven't been added to the collection. Once theyre added, it seems
826 to always return keyValue.Key.
827 (Properties): the unit tests show this returns a 0 length
830 2005-10-05 Chris Toshok <toshok@ximian.com>
832 * ConfigurationPermissionAttribute.cs: stub out.
834 2005-10-05 Chris Toshok <toshok@ximian.com>
836 * TimeSpanMinutesOrInfiniteConverter.cs: fill in the
839 2005-10-05 Chris Toshok <toshok@ximian.com>
841 * TimeSpanSecondsConverter.cs: new implementation.
843 2005-10-05 Chris Toshok <toshok@ximian.com>
845 * TimeSpanMinutesConverter.cs: flesh out implementation.
847 * ConfigurationConverterBase.cs: make all subclasses work with
848 strings only, since that's what seems to manifest itself in the
851 2005-10-05 Chris Toshok <toshok@ximian.com>
853 * ConfigurationLockCollection.cs: add NIE'd AttributeList
856 * ConfigurationConverterBase.cs: add MonoTODO'd CanConvertFrom and
857 CanConvertTo methods.
859 * ConfigurationSectionGroup.cs: add NIE'd IsDeclared property.
861 * ProtectedConfigurationSection.cs: add NIE'd properties.
863 * ConfigurationElementCollection.cs: add MonoTODO'd IsReadOnly
864 and SetReadOnly methods, and have then chain up to the base class.
866 * KeyValueConfigurationCollection.cs: add the class level
867 ConfigurationCollectionAttribute, and add a NIE'ed Properties
870 * ProviderSettingsCollection.cs: add the class level
871 ConfigurationCollectionAttribute, and add a "new" keyword to the
872 this property. Also, nuke the Provider's property.
874 * SectionInformation.cs: add some NEI'd properties.
876 * ConfigurationSection.cs (ResetModified): leave the MonoTODO, but
877 chain up to base class's method instead of throwing NIE.
879 * ConnectionStringSettingsCollection.cs: add the class-level
880 ConfigurationCollectionAttribute, and add the unimplemented
883 * ConfigurationErrorsException.cs: flesh this out, and add a
884 pragma to disable the obsolete warnings from our base class.
886 * ProviderSettings.cs: add unimplemented Properties property.
888 * ConfigurationElement.cs: remove unnecessary
889 EvaluationInformation.
891 * InternalConfigurationRoot.cs: add unimplemented IsDesignTime
894 * ConfigurationProperty.cs: add a missing ctor.
896 * AppSettingsSection.cs: add missing "override" keyword.
898 * ConnectionStringsSection.cs: remove override.
900 * ConfigurationSectionCollection.cs: AllKeys -> Keys, and add
901 unimplemented GetObjectData override.
903 * ConfigurationSectionGroupCollection.cs: same.
905 * ConfigurationCollectionAttribute.cs: add missing CollectionType
908 2005-10-05 Chris Toshok <toshok@ximian.com>
910 * ConfigurationPermission.cs: new implementation.
912 * IgnoreSection.cs: new implementation.
914 2005-10-05 Chris Toshok <toshok@ximian.com>
916 * CommaDelimitedStringCollection.cs: new implementation.
918 2005-10-05 Chris Toshok <toshok@ximian.com>
920 * NameValueConfigurationCollection.cs: new implementation.
922 * NameValueConfigurationElement.cs: new implementation.
924 2005-10-05 Chris Toshok <toshok@ximian.com>
926 * ValidatorCallback.cs: new implementation.
928 * SubclassTypeValidator.cs, SubclassTypeValidatorAttribute.cs: new
931 * CallbackValidator.cs, CallbackValidatorAttribute.cs: new
934 * RegexStringValidator.cs, RegexStringValidatorAttribute.cs: new
937 * LongValidator.cs, LongValidatorAttribute.cs: new implementation.
939 * IntegerValidator.cs, IntegerValidatorAttribute.cs: new
942 * DefaultValidator.cs: new implementation.
944 2005-09-28 Chris Toshok <toshok@ximian.com>
946 * ConfigurationElementCollection.cs: more work on the "<clear />"
947 handling - just skip the element for now. this causes a failure
948 in one test ('<clear hi="bye" />' doesn't throw an exception when
949 it should), but it succeeds for collections that have required
952 * ConnectionStringSettings.cs: providerName isn't a required
955 * AppSettingsSection.cs (.cctor): initialize our "file" Property.
958 (GetRuntimeObject): call the base class method instead of just
961 * ConnectionStringsSection.cs: Add a hacky DeserializeElement
962 method here (that isn't in MS's) for the time being so we actually
963 deserialize our collection.
965 2005-09-28 Chris Toshok <toshok@ximian.com>
967 * KeyValueInternalCollection.cs: found this by way of a stack
968 trace in one of the tests. A NameValueCollection that wraps a
969 KeyValueConfigurationCollection.
971 * Configuration.cs (Init): save off configPath.
972 (EvaluationContext): new, mostly implemented.
973 (GetSectionInstance): use IgnoreSection instead of
975 (Load): don't fail when we can't load a file.
977 * IgnoreSection.cs: replace RuntimeOnlySection with this new
980 * RuntimeOnlySection.cs: nuke.
982 2005-09-27 Chris Toshok <toshok@ximian.com>
984 * TimeSpanMinutesOrInfiniteConverter.cs: this is sealed.
986 2005-09-27 Chris Toshok <toshok@ximian.com>
988 * ConfigurationProperty.cs: add IsDefaultCollection property.
990 2005-09-27 Chris Toshok <toshok@ximian.com>
992 * ConfigurationElementProperty.cs: new file.
994 * ConfigurationLockCollection.cs: new file.
996 * ConfigurationElementCollection.cs
997 (OnDeserializeUnrecognizedElement): make sure we consume the
998 <clear /> element so we don't into an endless loop.
1000 * ConfigurationElement.cs: add a bunch of NIE's properties.
1002 * ContextInformation.cs: Add NIE'ed IsMachineLevel property.
1004 2005-09-23 Chris Toshok <toshok@ximian.com>
1006 * AppSettingsSection.cs: fix build and add a couple of TODO'ed
1009 2005-09-23 Chris Toshok <toshok@ximian.com>
1011 * ProviderSettings.cs (Unmerge): track change to
1012 ConfigurationElement.Unmerge.
1014 * ConfigurationSection.cs: add functions nuked from
1015 ConfigurationElement here.
1017 * ConfigurationElementCollection.cs: add DebuggerDisplay attribute
1019 (BaseGetAllKeys): returns object[], not string[].
1020 (BaseGetKey): returns object, not string.
1021 (Unmerge): track change to ConfigurationElement.Unmerge signature.
1023 * ConfigurationElement.cs (ConfigurationElement.Unmerge): fix
1024 signature (drop the serializeCollectionKey parameter).
1027 2005-09-23 Chris Toshok <toshok@ximian.com>
1029 * StringValidator.cs: throw ArgumentException instead of
1030 ConfigurationErrorsException.
1032 2005-09-23 Chris Toshok <toshok@ximian.com>
1034 * ConnectionStringsSection.cs: track change to
1035 ConfigurationPropertyOptions.
1037 * ConfigurationPropertyAttribute.cs, ConfigurationProperty.cs,
1038 ProviderSettings.cs: track change to ConfigurationPropertyOptions.
1040 * ConnectionStringSettings.cs: track change to
1041 ConfigurationProprertyOptions, and add some ConfigurationProperty
1044 * ConfigurationPropertyOptions.cs: DefaultCollection ->
1045 IsDefaultCollection, Required -> IsRequired.
1047 2005-09-22 Chris Toshok <toshok@ximian.com>
1049 * PositiveTimeSpanValidator.cs: this lives in
1050 System.Web.Configuration, not System.Configuration.
1052 2005-09-22 Chris Toshok <toshok@ximian.com>
1054 * TimeSpanValidator.cs: change to ArgumentException and alter the
1057 2005-09-22 Chris Toshok <toshok@ximian.com>
1059 * ExeConfigurationFileMap.cs (ctor): init all the strings to "".
1061 2005-07-01 Lluis Sanchez Gual <lluis@novell.com>
1063 * ProviderSettings.cs: Implemented properties using property attributes.
1064 * ConfigurationElement.cs: Implemented ElementInformation property and
1065 moved there all value management.
1066 * ProtectedConfigurationProvider.cs: Set the correct base class.
1067 * SectionInformation.cs: Added missing AllowExeDefinition property.
1068 * TimeSpanValidatorAttribute.cs: Implemented.
1069 * StringValidator.cs: Implemented.
1070 * ProviderSettingsCollection.cs: Added missing class attribute.
1071 * ConfigurationSaveMode.cs: Fix enum values.
1072 * ConfigurationElementCollection.cs: Added Init method for initializing
1073 elements from properties.
1074 * StringValidatorAttribute.cs: Implemented.
1075 * ConfigurationLocation.cs: Added support for allowOverride flag.
1076 * TimeSpanMinutesOrInfiniteConverter.cs: Created skeleton class.
1077 * PositiveTimeSpanValidator.cs: Implemented.
1078 * TimeSpanMinutesConverter.cs: Created skeleton class.
1079 * SectionInfo.cs: Properly read, store and check the values of AllowLocation,
1080 AllowDefinition and AllowExeDefinition.
1081 * TimeSpanValidator.cs: Implemented.
1082 * ConfigurationConverterBase.cs: Created skeleton class.
1083 * InternalConfigurationHost.cs: Implemented IsDefinitionAllowed and
1084 VerifyDefinitionAllowed.
1085 * ConfigurationManager.cs: That class must be static.
1086 * PropertyInformationCollection.cs: Implemented.
1087 * Configuration.cs: Added some checks for AllowLocation, AllowDefinition and
1088 so on. In Save(), don't forget to save location elements.
1089 * ConfigurationProperty.cs: Keep track of collection attributes.
1090 * ConfigInfo.cs: Support overrideAllowed flag.
1091 * KeyValueConfigurationElement.cs: Define properties using attributes.
1092 * PropertyValueOrigin.cs: implemented.
1093 * PropertyInformation.cs: Mostly implemented.
1094 * SectionGroupInfo.cs: Properly propagate the overrideAllowed flag.
1095 * ElementInformation.cs: Mostly implemented.
1096 * ConfigurationPropertyAttribute.cs: Set the correct default value.
1097 * ConfigurationCollectionAttribute.cs: Implemented.
1099 2005-06-23 Lluis Sanchez Gual <lluis@novell.com>
1101 * SectionInfo.cs: Set the config host when loading the section.
1102 * InternalConfigurationHost.cs: Implemented some basic methods.
1103 * Configuration.cs: Find the correct parent for the configuration,
1104 taking into accound locations and such. Use Host functions to get
1106 * ConfigurationLocationCollection.cs: Added find method.
1107 * ConfigInfo.cs: Added Host property.
1108 * InternalConfigurationFactory.cs: The InitForConfiguration calls
1109 are now done in each correspoding configuration.
1110 * SectionGroupInfo.cs: When reading a location element, create
1111 a Configuration object for each path specified in the location.
1112 * ConfigurationElementCollection.cs: Added the CreateNewElementInternal
1113 method, which properly initializes the created element.
1114 * ConfigurationLocation.cs: OpenConfiguration now has to read the
1115 xml contents. It also has to find the correct parent configuration,
1116 if it has not been specified.
1118 2005-06-17 Lluis Sanchez Gual <lluis@novell.com>
1120 * SectionInfo.cs, ConfigInfo.cs, SectionGroupInfo.cs: Minor api fixes.
1121 * ConfigurationPropertyCollection.cs: Added Clear method.
1122 * ContextInformation.cs: Implemented.
1123 * ConfigurationManager.cs: Implemented some missing methods.
1124 Configuration objects are now created through the ConfigurationFactory.
1125 * InternalConfigurationHost.cs: Implementation of IInternalConfigHost
1126 to be used for exe files and machine.config.
1127 * ConfigurationFileMap.cs: Implemented.
1128 * Configuration.cs: Read and write config files using the methods that
1129 IInternalConfigHost provides.
1130 * InternalConfigurationRoot.cs: IInternalConfigRoot stub.
1131 * ExeContext.cs: Implemented.
1132 * AppSettingsSection.cs: Use the KeyValueConfigurationCollection
1133 collection to store values.
1134 * KeyValueConfigurationElement.cs: Implemented.
1135 * KeyValueConfigurationCollection.cs: Implemented.
1136 * InternalConfigurationFactory.cs: An implementation of
1137 IInternalConfigConfigurationFactory.
1138 * ConfigurationPropertyAttribute.cs: Added missing attributes.
1139 * ExeConfigurationFileMap.cs: Implemented.
1141 2005-06-15 Lluis Sanchez Gual <lluis@novell.com>
1143 * ConfigurationElement.cs, ConfigurationErrorsException.cs
1144 SectionInfo.cs, ConnectionStringSettingsCollection.cs,
1145 ConfigurationPropertyCollection.cs, ProtectedConfigurationProvider.cs,
1146 ConfigurationSection.cs, NonEmptyStringConfigurationProperty.cs,
1147 ConfigurationElementCollectionType.cs, Configuration.cs,
1148 ConnectionStringSettings.cs, ConfigurationProperty.cs,
1149 ConfigurationLocationCollection.cs, TimeSpanConfigurationProperty.cs,
1150 ConfigurationAllowDefinition.cs, ConfigInfo.cs,
1151 ConfigurationSectionGroupCollection.cs, AppSettingsSection.cs,
1152 ProviderSettingsCollection.cs, IntegerConfigurationProperty.cs,
1153 SectionGroupInfo.cs, ConfigurationUserLevel.cs,
1154 ConnectionStringsSection.cs, ConfigurationPropertyAttribute.cs,
1155 ConfigurationLocation.cs, ConfigurationSectionCollection.cs,
1156 ConfigurationSectionGroup.cs, RuntimeOnlySection.cs,
1157 ProviderSettings.cs:
1160 * ConfigurationElementCollection.cs: Implemented support for Basic
1161 collection type. Other fixes.
1163 * ConfigurationPropertyFlags.cs: Renamed to ConfigurationPropertyOptions.
1164 * ConfigurationUpdateMode.cs: Renamed to ConfigurationSaveMode.
1166 * SectionInformation.cs, ConfigurationAllowExeDefinition.cs
1167 ConfigurationManager.cs, ConfigurationSaveMode.cs,
1168 ConfigurationValidatorAttribute.cs, ProtectedConfigurationSection.cs,
1169 ConfigurationValidatorBase.cs, ConfigurationPropertyOptions.cs:
1172 * ConfigurationValidationAttribute.cs: Removed.
1174 * ProviderBase.cs: Moved to System.dll.
1176 2005-06-14 Lluis Sanchez Gual <lluis@novell.com>
1178 * AppSettingsSection.cs, ConfigInfo.cs, Configuration.cs
1179 ConfigurationAllowDefinition.cs, ConfigurationElement.cs
1180 ConfigurationElementCollection.cs, ConfigurationElementCollectionType.cs
1181 ConfigurationLocation.cs, ConfigurationLocationCollection.cs
1182 ConfigurationProperty.cs, ConfigurationPropertyAttribute.cs
1183 ConfigurationPropertyCollection.cs, ConfigurationPropertyFlags.cs
1184 ConfigurationSection.cs, ConfigurationSectionCollection.cs
1185 ConfigurationSectionGroup.cs, ConfigurationSectionGroupCollection.cs
1186 ConfigurationUpdateMode.cs, ConfigurationUserLevel.cs
1187 ConfigurationValidationAttribute.cs, ConnectionStringsSection.cs
1188 ConnectionStringSettingsCollection.cs, ConnectionStringSettings.cs
1189 IntegerConfigurationProperty.cs, NonEmptyStringConfigurationProperty.cs
1190 NonEmptyStringFlags.cs, PathLevel.cs, ProtectedConfigurationProvider.cs
1191 ProviderBase.cs, ProviderSettings.cs, ProviderSettingsCollection.cs
1192 RuntimeOnlySection.cs, SectionInfo.cs, SectionGroupInfo.cs
1193 TimeSpanConfigurationProperty.cs, TimeSpanPropertyFlags.cs
1194 TimeSpanSerializedFormat.cs:
1196 Moved from the System assembly.