ignore properties with null or empty name
[mono.git] / mcs / class / System.Configuration / System.Configuration / ChangeLog
1 2007-01-16  Konstantin Triger <kostat@mainsoft.com>
2
3         * ConfigurationElement.cs: ignore properties with null or empty name.
4
5 2007-01-16  Konstantin Triger <kostat@mainsoft.com>
6
7         * ConfigurationElement.cs: Try to deserilalize an unrecognized element by
8                 current element, and only if failed delegate to default collection.
9
10 2006-12-27  Vladimir Krasnov  <vladimirk@mainsoft.com>
11
12         * ConfigurationElementCollection.cs: fixed BaseAdd, looking for
13         identical element when collection type is not alternate
14
15 2006-12-27  Vladimir Krasnov  <vladimirk@mainsoft.com>
16
17         * ConnectionStringSettingsCollection.cs: made connection string key
18         case insensitive
19
20 2006-12-27  Atsushi Enomoto  <atsushi@ximian.com>
21
22         * ConfigurationElementCollection.cs : fixed BaseAdd() with
23           throwIfExists to not raise an error for identical element
24           but for different element which shares the same key. Fix by
25           Konstantin Triger.
26
27 2006-12-21  Vladimir Krasnov  <vladimirk@mainsoft.com>
28
29         * ConfigurationProperty.cs: fixed DefaultValue of type Enum
30
31 2006-12-10  Konstantin Triger <kostat@mainsoft.com>
32
33         * ConfigurationElement.cs: Delegate parameter checking and default
34                 assigning to Configuratin property.
35         * ConfigurationProperty.cs:
36                 Ensure the TypeConvert and Validator always exist.
37                 Ensure the primitive types are properly initialized.
38
39 2006-12-09  Vladimir Krasnov  <vladimirk@mainsoft.com>
40
41         * ConfigurationElementCollection.cs
42         * ConfigurationRemoveElement.cs: fixed key for <remove> element in
43         ConfigurationRemoveElement class
44
45 2006-11-28  Marek Habersack  <grendello@gmail.com>
46
47         * SectionGroupInfo.cs: Implement merging of section groups with
48         the same names and parents.
49
50         * ConfigInfo.cs: Add an abstract method for merging sections.
51
52         * SectionInfo.cs: Add implementation of an abstract base method
53
54 2006-08-23  Konstantin Triger <kostat@mainsoft.com>
55
56         * SectionInfo.cs: refactoring - remove unneeded bool? usage.
57         
58 2006-11-05  Vladimir Krasnov  <vladimirk@mainsoft.com>
59
60         * added: ConfigurationRemoveElement.cs, common element for <remove>
61         * ConnectionStringSettingsCollection.cs: reverted last fix for
62         <remove> element
63         * ConfigurationElementCollection.cs: fixed the way that
64         OnDeserializeUnrecognizedElement method handles <remove> element
65
66 2006-11-02  Vladimir Krasnov  <vladimirk@mainsoft.com>
67
68         * ConfigurationElement.cs: typo in DefaultCollectionProperty
69         method
70
71 2006-10-30  Joel Reed <joel.reed@ddiworld.com>
72
73         * NameValueConfigurationCollection.cs: Implement the Properties
74         property. 
75
76 2006-08-23  Konstantin Triger <kostat@mainsoft.com>
77
78         * ConfigurationLocation.cs: do not read root element, correctly close stream.
79         * Configuration.cs: use ReadData for nested content to throw if location
80                 elements are encounterd.
81                 In constructor taking parent Configurqation: do not call Init and so avoid
82                 rereading config file.
83
84 2006-09-05  Vladimir Krasnov  <vladimirk@mainsoft.com>
85
86         * NameValueConfigurationElement.cs: fixed functionality
87         * ConfigurationElementCollection.cs,
88         ConnectionStringSettingsCollection.cs: fixed <remove> element in
89         connectionStrings section
90
91 2006-08-23  Konstantin Triger <kostat@mainsoft.com>
92
93         * ConfigurationSection.cs: for net 1.1 SectionHandlers: return null in case
94                 RawXml is null, as net 1.1 does.
95
96 2006-08-17  Vladimir Krasnov  <vladimirk@mainsoft.com>
97
98         * ConfigurationFileMap.cs: added TARGET_JVM on not supported members
99         in grasshopper
100
101 2006-07-07  Atsushi Enomoto  <atsushi@ximian.com>
102
103         * ConfigurationManager.cs : OpenExeConfiguration(null) should still
104           work. This is required for embedded scenario.
105
106 2006-06-10  Atsushi Enomoto  <atsushi@ximian.com>
107
108         * SectionGroupInfo.cs : skip <dllmap> in configuration.
109
110 2006-05-14  Atsushi Enomoto  <atsushi@ximian.com>
111
112         * ConfigurationManager.cs: since ConfigurationSystem is different
113           for web.config, cast from ConfigurationSection to runtime object
114           should be done at GetSection().
115           This really fixed bug #78372.
116
117 2006-05-12  Atsushi Enomoto  <atsushi@ximian.com>
118
119         * Configuration.cs : configPath is null for machine.config, so don't
120           use it. Use streamName instead. To my understanding, this should
121           fix bug #78372.
122
123 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
124
125         * ConnectionStringSettings.cs : it seems that "name" property
126           could be null i.e. there is no StringValidator.
127         * StringValidator.cs : allow null.
128
129 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
130
131         * ConfigurationManager.cs : use GetCallingAssembly() instead of
132           GetEntryAssembly() which possibly returns null (e.g. nunit) in
133           OpenExeConfiguration(). Several nunit test failures are gone.
134
135 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
136
137         * ConnectionStringSettings.cs : oops, this API fix broke standalone
138           test.
139
140 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
141
142         * ConfigurationElement.cs,
143           ConfigurationErrorsException.cs,
144           ConfigurationUserLevel.cs,
145           ConfigurationPropertyOptions.cs,
146           ConnectionStringSettings.cs : assorted minor corcompare fixes.
147
148 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
149
150         * Configuration.cs : some kind of refactoring is absolutely needed
151           here. Reuse RawXml from parentSection when data was not available
152           on current section. This should fix bug #78353.
153
154 2006-05-10  Atsushi Enomoto  <atsushi@ximian.com>
155
156         * ConfigurationElement.cs,
157           DefaultSection.cs :
158           in some cases RawXml was set null string, so skip such cases.
159         * Configuration.cs : support IConfigurationSectionHandler here.
160         * ConfigurationManager.cs : GetSection() now returns name value
161           collection, not a section.
162         * ConfigurationSection.cs : added SectionHandler for
163           IConfigurationSectionHandler support, and use its Create() in
164           GetRuntimeObject().
165         * ClientConfigurationSystem.cs :
166           use GetRuntimeObject() in GetSection(). Thus now
167           ConfigurationManager.GetSection() returns a runtime object.
168           Fixed bug #78337.
169
170 2006-04-28  Atsushi Enomoto  <atsushi@ximian.com>
171
172         * SectionGroupInfo.cs :
173           sections which are defined in sectionGroups could be directly
174           referenced, so search corresponding section recursively.
175         * DefaultSection.cs : It does not reject unrecognized contents.
176
177 2006-04-26  Chris Toshok  <toshok@ximian.com>
178
179         * SectionInformation.cs (.ctor): add MonoTODO about the default
180         value for require_permission.
181         (RequirePermission): implement the getter/setter for this so
182         Atsushi's previous commit doesn't break everything :)
183
184 2006-04-26  Atsushi Enomoto  <atsushi@ximian.com>
185
186         * Configuration.cs,
187           SectionInfo.cs : added support for "requirePermission" attribute
188           in "section" element. This fixes bug #77957.
189
190 2006-04-25  Chris Toshok  <toshok@ximian.com>
191
192         * ConfigurationElementCollection.cs (Reset): it makes no sense to
193         pass the typename to CreateNewElementInternal.  the argument is
194         the elementname. pass null instead.
195         (Unmerge): same.
196
197 2006-02-01  Atsushi Enomoto  <atsushi@ximian.com>
198
199         * ConfigurationElement.cs : ListErrors() and SetPropertyValue()
200           are protected.
201         * ConfigurationSection.cs : the .ctor() is protected.
202         * ConfigurationElementCollection.cs : CollectionType is public.
203           Count and BaseAdd() are not virtual.
204         * ConfigurationPropertyCollection.cs : Count is not virtual.
205
206 2006-02-01  Chris Toshok  <toshok@ximian.com>
207
208         * ConfigurationElement.cs: revert the patch that stores and writes
209         out xmlns attributes for all elements.
210
211         * ClientConfigurationSystem.cs: SupportsUserConfig == false.
212
213         * AppSettingsSection.cs (GetRuntimeObject): call col.SetReadOnly()
214         only if SupportsUserConfig != true.
215
216         * ConfigurationManager.cs (ConfigurationSystem): add a property
217         like ConfigurationFactory, and use it instead of the private field
218         throughout.
219
220 2006-01-26  Chris Toshok  <toshok@ximian.com>
221
222         * SectionGroupInfo.cs (ReadContent): handle "location" (seemingly)
223         correctly.
224
225         * InternalConfigurationRoot.cs: misc logical additions.  still
226         isn't useful.
227
228         * ConfigurationManager.cs (OpenExeConfigurationInternal): throw an
229         exception if both calling_assembly and exePath are null.  Allow
230         the exePath to be a path to a config file as well, checking to see
231         if it ends in .config before appending.
232         (OpenExeConfiguration): stop blindly passing
233         Assembly.GetCallingAssembly.  I'm assuming this will likely break
234         .dll.config usage.  need to investigate that (and write more unit
235         tests.)
236         (GetSection): call configSystem.GetSection.
237         (RefreshSection): call configSystem.RefreshSection.
238         (ChangeConfigurationSystem): modeled after the
239         ConfigurationSettings System.Web hack - allow
240         WebConfigurationManager to replace the current
241         IInternalConfigSystem.
242
243         * InternalConfigurationHost.cs (InternalConfigurationHost): make
244         abstract, and remove all the NotImplenmentedException's.
245
246         * ConfigurationElement.cs (DeserializeElement): store off the xml
247         namespace if there is one.
248         (SerializeElement): write out the namespace if there was one.
249
250         * ClientConfigurationSystem.cs: new class, based on some stack
251         traces I've seen in tests.  Kinda (well, not *kinda*..) hacky.
252
253         * Configuration.cs (NamespaceDeclared): implement.
254         (Load): don't swallow all exceptions, just the ones raised when we
255         open the stream for reading.
256         (ReadConfigFile): handle xmlns.
257
258 2006-01-25  Chris Toshok  <toshok@ximian.com>
259
260         * ConfigInfo.cs (ThrowException): throw a
261         ConfigurationErrorsException, not a ConfigurationException.
262
263         * SectionGroupInfo.cs (ReadContent): throw an exception
264         unconditionally if we see a <location>.  they aren't valid in
265         section groups.
266
267 2006-01-25  Chris Toshok  <toshok@ximian.com>
268
269         * KeyValueInternalCollection.cs: don't use a nested collection,
270         just defer to our base class.  This fixes usage of
271         ConfigurationManager.AppSettings.Keys.
272
273 2006-01-13  Chris Toshok  <toshok@ximian.com>
274
275         * AppSettingsSection.cs (GetRuntimeObject): only access
276         Settings[key] once per iteration.
277
278 2006-01-09  Chris Toshok  <toshok@ximian.com>
279
280         * ConfigurationManager.cs (AppSettings): just return
281         AppSettingsSection.GetRuntimeObject() here.
282
283         * AppSettingsSection.cs: fix the "file" property to match dumper
284         output.
285         (GetRuntimeObject): this returns a KeyValueInternalCollection in
286         MS's implementation.
287
288 2006-01-09  Chris Toshok  <toshok@ximian.com>
289
290         * ElementInformation.cs (Validator): if propertyInfo == null,
291         return a DefaultValidator instance.
292
293 2006-01-09  Chris Toshok  <toshok@ximian.com>
294
295         * AppSettingsSection.cs (.cctor): specify null for
296         validator/converter.
297
298         * ProtectedProviderSettings.cs (.cctor): specify null for
299         validator/converter.
300
301 2006-01-03  Chris Toshok  <toshok@ximian.com>
302
303         * Configuration.cs (SaveAs): open with FileMode.OpenOrCreate so we
304         can save to a new file.
305         (CreateSection): don't bother to set the section information's
306         Name here.  we'll do it in SectionInfo.CreateInstance.
307
308         * ProtectedConfiguration.cs (Section): new static property so we
309         can remove all the GetSection calls.
310         (GetProvider): load a named provider, optionally throwing an
311         exception if it's not found.
312
313         * InternalConfigurationHost.cs (EncryptSection, DecryptSection):
314         make these private interface implementations, and call
315         protectedSection.{EncryptSection,DecryptSection}.
316
317         * ProtectedConfigurationSection.cs (EncryptSection,
318         DecryptSection): add these two calls.  They really shouldn't be
319         here, but I saw them in an MS stack trace and thought "why not?".
320
321         * ConfigurationSection.cs (SectionInformation): don't set
322         attributes here, that's done in SectionInfo.CreateInstance.
323         (DeserializeSection): shoehorn in the decryption stuff here.  It
324         doesn't belong here, and I've added a MonoTODO about it.  It
325         should live someplace like SectionInfo.ReadData (which would make
326         it similar to the encryption stuff in .WriteData).
327
328         * SectionInformation.cs (IsProtected): remove the special flag,
329         just return true if we have a non-null protection_provider.
330         (ProtectSection): do nothing but try to instantiate the named
331         provider.
332         (UnprotectSection): null out protection_provider.
333
334         * DpapiProtectedConfigurationProvider.cs: move the
335         NotSupportedExceptions to Decrypt/Encrypt so we don't bomb out
336         when parsing our machine.config file.
337
338         * RsaProtectedConfigurationProvider.cs: initial implementation.
339         much is missing (OAEP support, key importing, adding/deleting
340         keys), but it can be used.
341
342 2006-01-02  Chris Toshok  <toshok@ximian.com>
343
344         * RsaProtectedConfigurationProvider.cs: implement the
345         CspProviderName and UseOAEP properties..
346
347 2006-01-02  Chris Toshok  <toshok@ximian.com>
348
349         * ProtectedConfigurationSection.cs: flesh this out (and add logic
350         to instantiate providers, based on some of the standalone test
351         exception stack traces.)
352
353         * ProtectedConfiguration.cs: new implementation.
354
355         * ProtectedConfigurationProviderCollection.cs: new
356         implementation.
357
358         * ProtectedProviderSettings.cs: new implementation.
359
360         * ProtectedConfigurationProvider.cs: trim the superclass's name.
361
362         * RsaProtectedConfigurationProvider.cs: stubbed, unimplemented.
363
364         * DpapiProtectedConfigurationProvider.cs: add stubbed
365         implementation that throws NotSupportedException telling people
366         they should be using RsaProtectedConfigurationProvider.
367
368 2006-01-02  Chris Toshok  <toshok@ximian.com>
369
370         * DefaultSection.cs (Properties): implement.
371
372         * IgnoreSection.cs: move from lazily creating the properties
373         collection to sharing a single one across all instances.
374
375         * ConfigurationLockCollection.cs (IsReadOnly): fix compiler warning.
376
377         * ConfigurationElementCollection.cs (BaseAdd) remove logic to
378         remove an old matching element.
379         (BaseGetKey): throw an exception if @index is out of range.
380
381         * SectionInformation.cs (SectionName): just return name, like Name
382         does.. redundant, but it matches tests.
383         (GetRawXml): implement.
384         (SetRawXml): implement.
385
386         * ConfigurationSection.cs (SectionInformation): fill in
387         sectionInformation.Type before returning.
388         (DeserializeSection): save off the raw xml to our
389         SectionInformation.
390
391         * ConfigurationElement.cs (LockItem): implement.
392         (DeserializeElement): add support for the "lockItem" attribute.
393
394 2005-12-16  Chris Toshok  <toshok@ximian.com>
395
396         * ConfigurationLockCollection.cs (Add): only add the name if it's
397         not already there.
398         (IsReadOnly): always return false for the time being, in the
399         non-exceptional case.
400
401 2005-12-15  Chris Toshok  <toshok@ximian.com>
402
403         * ConfigurationElement.cs (LockAllAttributesExcept): implement.
404         (LockAllElementsExcept): implement.
405         (DeserializeElement): handle the built-in attributes (lock* for
406         the time being).
407
408 2005-12-15  Chris Toshok  <toshok@ximian.com>
409
410         * ConfigurationLockCollection.cs (..ctor): don't call Populate.
411         (Populate): nuke.
412         (CheckName): make sure the passes in name is valid for this type
413         of lock collection.
414         (Add): call CheckName, and set is_modified to true.
415         (Clear): set is_modified.
416         (IsReadOnly): add plausable implementation, including exception in
417         the case where the name isn't found.
418         (Remove): set is_modified.
419         (SetFromList): implement.
420         (get_AttributeList): implement.
421         (set_IsModified): add internal setter so we can clear the modified
422         flag.
423
424 2005-12-12  Chris Toshok  <toshok@ximian.com>
425
426         * AppSettingsSection.cs (DeserializeElement): provide rather naive
427         version of the file="" handling.  It's enough to make our tests
428         pass.
429
430 2005-12-11  Chris Toshok  <toshok@ximian.com>
431
432         * ConnectionStringsSection.cs (..cctor): use "" instead of null
433         for the name of the default collection.
434
435         * AppSettingsSection.cs (..cctor): create a property for the
436         default collection.
437         (DeserializeElement): call base.DeserializeElement.
438         (File): index off the property, not the name.
439         (Settings): don't use an private variable here, use
440         base[_propSettings].
441
442         * ConfigurationManager.cs (GetSection): GetEntryAssembly returns
443         null for new app domains.  so deal with this by calling
444         GetCallingAssembly if it's null.  This is probably still wrong but
445         it doesn't NRE in xsp2.
446         (AppSettings): remove MonoTODO.
447         
448         * KeyValueConfigurationElement.cs (..ctor): new method, create the
449         ConfigurationProperty's and the collection here.
450         (.ctor): add internal arg-less ctor.
451         (Key): use keyProp instead of "key".
452         (Value): use vlaueProp instead of "value".
453         (Properties): return our class's properties.
454
455         * KeyValueConfigurationCollection.cs (CreateNewElement): use the
456         arg-less ctor.
457         (GetElementKey): re-enable the BaseIndexOf test.
458
459 2005-12-02  Chris Toshok  <toshok@ximian.com>
460
461         * Configuration.cs (Save): call WriteStartDocument.
462
463         * ConnectionStringSettingsCollection.cs (CreateNewElement): use
464         parameter-less ctor to keep from generating exceptions when using
465         the collection.
466
467 2005-12-02  Chris Toshok  <toshok@ximian.com>
468
469         * ConnectionStringSettings.cs: tabify, fix default values, and add
470         a string validator for "name".
471
472 2005-12-02  Chris Toshok  <toshok@ximian.com>
473
474         * CommaDelimitedStringCollectionConverter.cs (ConvertTo): change
475         the type check away from an exact check for
476         CommaDelimitedStringCollection to an assignable test from
477         StringCollection.  This is due to the fact that AuthorizationRule
478         doesn't create CommaDelimitedStringCollections, for some odd
479         reason.  It uses StringCollections.
480
481         * PropertyInformation.cs (Value): remove the case for
482         IsDefaultCollection - it's not necessary, as the property is an
483         Element.
484
485         * ConnectionStringSettings.cs: fix formatting and remove some
486         #regions.
487
488         * ConnectionStringSettingsCollection.cs: same.
489
490         * ConnectionStringsSection.cs: same.
491
492         * ConfigurationElement.cs (SerializeToXmlElement): don't write the
493         enclosing start/end elements if the elementName is null or "".
494         this fixes the case for the DefaultCollections (at least in the
495         case of connectionStrings).
496
497         * IgnoreSection.cs (Properties): remove the MonoTODO.
498
499         * SectionInfo.cs (WriteData): remove the "<!-- dd -->" output.
500
501 2005-11-28  Chris Toshok  <toshok@ximian.com>
502
503         * ProviderSettings.cs: use ConfigurationProperty's to implement
504         the properties.
505
506 2005-11-24  Chris Toshok  <toshok@ximian.com>
507
508         * ConfigurationProperty.cs (Validate): add internal method.
509
510 2005-11-24  Chris Toshok  <toshok@ximian.com>
511
512         * ConfigurationElement.cs (ElementProperty): make this protected
513         internal virtual instead of public.
514         (SetPropertyValue): add a validator call and a blurb about the
515         code based on information gleaned from tests.
516         (set_Item (string)): call SetPropertyValue in the setter.
517         
518 2005-11-14  Chris Toshok  <toshok@ximian.com>
519
520         * CommaDelimitedStringCollection.cs: reformat things a bit, and
521         flag ToString() as override.
522
523         * DefaultSection.cs: new stubbed out implementation.
524
525         * CommaDelimitedStringCollectionConverter.cs: new implementation.
526
527 2005-11-10  Chris Toshok  <toshok@ximian.com>
528
529         * AppSettingsSection.cs (DeserializeElement): stop explicitly
530         calling Settings.DeserializeElement, as the DefaultCollection
531         works now.
532
533         * ConfigurationElement.cs (DeserializeElement): rework the loop
534         here so that we actually loop over all the content elements.
535
536 2005-11-09  Chris Toshok  <toshok@ximian.com>
537
538         * ConfigurationElement.cs: Add support for DefaultCollection
539         attributes.
540
541         * PropertyInformation.cs (PropertyInformation.Value): add case for
542         IsDefaultCollection.
543
544         * SectionGroupInfo.cs (SectionGroupInfo.ReadConfig): when we read
545         a "type" attribute, make sure the cached System.Type is cleared.
546
547 2005-10-25  Chris Toshok  <toshok@ximian.com>
548
549         * InfiniteTimeSpanConverter.cs: new implementation.
550
551         * InfiniteIntConverter.cs: new implementation.
552
553         * GenericEnumConverter.cs: new implementation.
554
555         * Configuration.cs: we don't need to check with "is" after we use
556         "as"..  just check for null-ness.
557
558         * KeyValueConfigurationCollection.cs: GetElementKey should throw
559         NRE if element == null.
560
561         * CommaDelimitedStringCollection.cs: raise the correct exceptions
562         in the read only case, and return null from ToString if there are
563         0 elements.
564
565 2005-10-25  Chris Toshok  <toshok@ximian.com>
566
567         * PositiveTimeSpanValidatorAttribute.cs: new implementation.
568
569         * PositiveTimeSpanValidator.cs: new implementation.
570
571 2005-10-24  Chris Toshok  <toshok@ximian.com>
572
573         * TimeSpanSecondsOrInfiniteConverter.cs: new implementation.
574
575         * TypeNameConverter.cs: new implementation.
576
577         * WhiteSpaceTrimStringConverter.cs: new implementation.
578
579 2005-10-24  Chris Toshok  <toshok@ximian.com>
580
581         * AppSettingsSection.cs (DeserializeElement, SerializeSection):
582         split the behavior based on if File == "".  If it is, we do the
583         default.  otherwise we throw NIE.
584
585         * ConnectionStringsSection.cs (DeserializeElement): we shouldn't
586         need this, but we do until the IsDefaultCollection stuff is fixed.
587
588         * ConfigurationElementCollection.cs
589         (OnDeserializeUnrecognizedElement): for clearElementName, make
590         sure we have no attributes.
591
592         * ConnectionStringSettingsCollection.cs (get_Properties): for now
593         just chain up to base.Properties.
594
595         * ConfigurationElement.cs (ReflectProperties): do the default
596         value/property type check in a more robust way, using
597         Convert.ChangeType.
598
599 2005-10-24  Chris Toshok  <toshok@ximian.com>
600
601         * ConfigurationElement.cs: treat
602         ConfigurationProperty.NoDefaultValue the same as null when we're
603         checking the default value's type.  this fixes t13 and 14.
604
605         * ConnectionStringsSection.cs (ConnectionStrings): fix the
606         DefaultValue in the ConfigurationPropertyAttribute.
607
608 2005-10-24  Chris Toshok  <toshok@ximian.com>
609
610         * KeyValueConfigurationCollection.cs (GetElementKey): sacrifice
611         one test to get another working.  Return a valid key even if the
612         element is not in this collection.
613         (get_ThrowOnDuplicate): return false.
614
615         * ConfigurationElementCollection.cs (BaseAdd): if we're adding an
616         element with the same key, overwrite the old one (remove the old
617         one after inserting the new one).  Also, re-enable the throwing of
618         exceptions if ThrowOnDuplicate == true.
619
620 2005-10-24  Chris Toshok  <toshok@ximian.com>
621
622         * AppSettingsSection.cs (Settings): fix ConfigurationProperty
623         attribute.
624
625         * ProtectedConfigurationSection.cs (Providers): same.
626
627 2005-10-12  Chris Toshok  <toshok@ximian.com>
628
629         * ConfigurationPermission.cs: flesh out as per tests.
630
631 2005-10-11  Chris Toshok  <toshok@ximian.com>
632
633         * ConfigurationProperty.cs: don't use null to mean no default
634         value, use NoDefaultValue.
635
636 2005-10-11  Chris Toshok  <toshok@ximian.com>
637
638         * KeyValueConfigurationCollection.cs (GetElementKey): duh.
639         BaseGet calls GetElementKey, so we were hitting an infinite
640         recursion here.  Use BaseIndexOf instead.
641
642 2005-10-07  Chris Toshok  <toshok@ximian.com>
643
644         * InternalConfigurationHost.cs: some interface work, adding in the
645         new methods.
646
647         * ConfigurationProperty.cs: remove debug spew.
648
649         * Configuration.cs: add NIE'd NamespaceDeclared property.
650
651         * ElementInformation.cs: add NIE'd Errors property.
652
653         * PropertyInformationCollection.cs: add NIE'd GetObjectData().
654
655         * ConfigurationManager.cs: quite a bit of new work here.  Some
656         definie TODO's still though.
657
658 2005-10-07  Chris Toshok  <toshok@ximian.com>
659
660         * ConfigurationErrorsException.cs (.ctor): for the (string)
661         overload, chain up to the base (string) ctor.
662
663 2005-10-07  Chris Toshok  <toshok@ximian.com>
664
665         * ConfigurationElement.cs (ElementMap.ReflectProperties): make
666         sure the type of the default value is compatible with that of the
667         property itself, and throw ConfigurationErrorsException if they
668         don't match.  Fixes t12.
669
670 2005-10-07  Chris Toshok  <toshok@ximian.com>
671
672         * ConfigHelper.cs: remove some unused code.
673
674         * ConfigurationProperty.cs: disambiguate the ctor we chain to.
675
676         * ConfigurationElement.cs (ElementProperty): implement.
677         (ElementMap.ReflectProperties): make DefaultValidator the default
678         validator, not null.
679
680 2005-10-06  Chris Toshok  <toshok@ximian.com>
681
682         * KeyValueConfigurationElement.cs: uncomment out some stuff.
683         (Properties): just return base.Properties.  Not sure why they
684         override this, as the base class's implementation passes our test.
685
686         * KeyValueConfigurationCollection.cs (Add): for the keyValue
687         overload, call keyValue.Init as the unit test stack traces
688         indicates that'9s where it's called.  For the string,string
689         overload, just call the keyValue overload instead of calling
690         BaseAdd.
691         (CreateNewElement): just use the name/value ctor, and specify ""
692         for each.
693         (GetElementKey): this function always returns "" for elements that
694         haven't been added to the collection.  Once theyre added, it seems
695         to always return keyValue.Key.
696         (Properties): the unit tests show this returns a 0 length
697         collection.
698
699 2005-10-05  Chris Toshok  <toshok@ximian.com>
700
701         * ConfigurationPermissionAttribute.cs: stub out.
702
703 2005-10-05  Chris Toshok  <toshok@ximian.com>
704
705         * TimeSpanMinutesOrInfiniteConverter.cs: fill in the
706         implementation.
707
708 2005-10-05  Chris Toshok  <toshok@ximian.com>
709
710         * TimeSpanSecondsConverter.cs: new implementation.
711
712 2005-10-05  Chris Toshok  <toshok@ximian.com>
713
714         * TimeSpanMinutesConverter.cs: flesh out implementation.
715
716         * ConfigurationConverterBase.cs: make all subclasses work with
717         strings only, since that's what seems to manifest itself in the
718         tests.
719
720 2005-10-05  Chris Toshok  <toshok@ximian.com>
721
722         * ConfigurationLockCollection.cs: add NIE'd AttributeList
723         property.
724
725         * ConfigurationConverterBase.cs: add MonoTODO'd CanConvertFrom and
726         CanConvertTo methods.
727
728         * ConfigurationSectionGroup.cs: add NIE'd IsDeclared property.
729
730         * ProtectedConfigurationSection.cs: add NIE'd properties.
731
732         * ConfigurationElementCollection.cs: add MonoTODO'd IsReadOnly
733         and SetReadOnly methods, and have then chain up to the base class.
734
735         * KeyValueConfigurationCollection.cs: add the class level
736         ConfigurationCollectionAttribute, and add a NIE'ed Properties
737         property.
738
739         * ProviderSettingsCollection.cs: add the class level
740         ConfigurationCollectionAttribute, and add a "new" keyword to the
741         this property.  Also, nuke the Provider's property.
742
743         * SectionInformation.cs: add some NEI'd properties.
744
745         * ConfigurationSection.cs (ResetModified): leave the MonoTODO, but
746         chain up to base class's method instead of throwing NIE.
747
748         * ConnectionStringSettingsCollection.cs: add the class-level
749         ConfigurationCollectionAttribute, and add the unimplemented
750         Properties property.
751
752         * ConfigurationErrorsException.cs: flesh this out, and add a
753         pragma to disable the obsolete warnings from our base class.
754
755         * ProviderSettings.cs: add unimplemented Properties property.
756
757         * ConfigurationElement.cs: remove unnecessary
758         EvaluationInformation.
759
760         * InternalConfigurationRoot.cs: add unimplemented IsDesignTime
761         property.
762
763         * ConfigurationProperty.cs: add a missing ctor.
764
765         * AppSettingsSection.cs: add missing "override" keyword.
766
767         * ConnectionStringsSection.cs: remove override.
768         
769         * ConfigurationSectionCollection.cs: AllKeys -> Keys, and add
770         unimplemented GetObjectData override.
771
772         * ConfigurationSectionGroupCollection.cs: same.
773
774         * ConfigurationCollectionAttribute.cs: add missing CollectionType
775         property.
776
777 2005-10-05  Chris Toshok  <toshok@ximian.com>
778
779         * ConfigurationPermission.cs: new implementation.
780
781         * IgnoreSection.cs: new implementation.
782
783 2005-10-05  Chris Toshok  <toshok@ximian.com>
784
785         * CommaDelimitedStringCollection.cs: new implementation.
786
787 2005-10-05  Chris Toshok  <toshok@ximian.com>
788
789         * NameValueConfigurationCollection.cs: new implementation.
790
791         * NameValueConfigurationElement.cs: new implementation.
792
793 2005-10-05  Chris Toshok  <toshok@ximian.com>
794
795         * ValidatorCallback.cs: new implementation.
796
797         * SubclassTypeValidator.cs, SubclassTypeValidatorAttribute.cs: new
798         implementation.
799
800         * CallbackValidator.cs, CallbackValidatorAttribute.cs: new
801         implementation.
802
803         * RegexStringValidator.cs, RegexStringValidatorAttribute.cs: new
804         implementation.
805
806         * LongValidator.cs, LongValidatorAttribute.cs: new implementation.
807
808         * IntegerValidator.cs, IntegerValidatorAttribute.cs: new
809         implementation.
810
811         * DefaultValidator.cs: new implementation.
812
813 2005-09-28  Chris Toshok  <toshok@ximian.com>
814
815         * ConfigurationElementCollection.cs: more work on the "<clear />"
816         handling - just skip the element for now.  this causes a failure
817         in one test ('<clear hi="bye" />' doesn't throw an exception when
818         it should), but it succeeds for collections that have required
819         attributes.
820
821         * ConnectionStringSettings.cs: providerName isn't a required
822         attribute.
823
824         * AppSettingsSection.cs (.cctor): initialize our "file" Property.
825         (File): implement.
826         (Properties): fix.
827         (GetRuntimeObject): call the base class method instead of just
828         returning "this".
829
830         * ConnectionStringsSection.cs: Add a hacky DeserializeElement
831         method here (that isn't in MS's) for the time being so we actually
832         deserialize our collection.
833
834 2005-09-28  Chris Toshok  <toshok@ximian.com>
835
836         * KeyValueInternalCollection.cs: found this by way of a stack
837         trace in one of the tests.  A NameValueCollection that wraps a
838         KeyValueConfigurationCollection.
839
840         * Configuration.cs (Init): save off configPath.
841         (EvaluationContext): new, mostly implemented.
842         (GetSectionInstance): use IgnoreSection instead of
843         RuntimeOnlySection.
844         (Load): don't fail when we can't load a file.
845
846         * IgnoreSection.cs: replace RuntimeOnlySection with this new
847         public type.
848
849         * RuntimeOnlySection.cs: nuke.
850         
851 2005-09-27  Chris Toshok  <toshok@ximian.com>
852
853         * TimeSpanMinutesOrInfiniteConverter.cs: this is sealed.
854
855 2005-09-27  Chris Toshok  <toshok@ximian.com>
856
857         * ConfigurationProperty.cs: add IsDefaultCollection property.
858
859 2005-09-27  Chris Toshok  <toshok@ximian.com>
860
861         * ConfigurationElementProperty.cs: new file.
862
863         * ConfigurationLockCollection.cs: new file.
864
865         * ConfigurationElementCollection.cs
866         (OnDeserializeUnrecognizedElement): make sure we consume the
867         <clear /> element so we don't into an endless loop.
868
869         * ConfigurationElement.cs: add a bunch of NIE's properties.
870
871         * ContextInformation.cs: Add NIE'ed IsMachineLevel property.
872
873 2005-09-23  Chris Toshok  <toshok@ximian.com>
874
875         * AppSettingsSection.cs: fix build and add a couple of TODO'ed
876         properties.
877
878 2005-09-23  Chris Toshok  <toshok@ximian.com>
879
880         * ProviderSettings.cs (Unmerge): track change to
881         ConfigurationElement.Unmerge.
882
883         * ConfigurationSection.cs: add functions nuked from
884         ConfigurationElement here.
885
886         * ConfigurationElementCollection.cs: add DebuggerDisplay attribute
887         to the class.
888         (BaseGetAllKeys): returns object[], not string[].
889         (BaseGetKey): returns object, not string.
890         (Unmerge): track change to ConfigurationElement.Unmerge signature.
891
892         * ConfigurationElement.cs (ConfigurationElement.Unmerge): fix
893         signature (drop the serializeCollectionKey parameter).
894         
895
896 2005-09-23  Chris Toshok  <toshok@ximian.com>
897
898         * StringValidator.cs: throw ArgumentException instead of
899         ConfigurationErrorsException.
900
901 2005-09-23  Chris Toshok  <toshok@ximian.com>
902
903         * ConnectionStringsSection.cs: track change to
904         ConfigurationPropertyOptions.
905
906         * ConfigurationPropertyAttribute.cs, ConfigurationProperty.cs,
907         ProviderSettings.cs: track change to ConfigurationPropertyOptions.
908
909         * ConnectionStringSettings.cs: track change to
910         ConfigurationProprertyOptions, and add some ConfigurationProperty
911         attributes.
912         
913         * ConfigurationPropertyOptions.cs: DefaultCollection ->
914         IsDefaultCollection, Required -> IsRequired.
915
916 2005-09-22  Chris Toshok  <toshok@ximian.com>
917
918         * PositiveTimeSpanValidator.cs: this lives in
919         System.Web.Configuration, not System.Configuration.
920
921 2005-09-22  Chris Toshok  <toshok@ximian.com>
922
923         * TimeSpanValidator.cs: change to ArgumentException and alter the
924         messages slightly.
925
926 2005-09-22  Chris Toshok  <toshok@ximian.com>
927
928         * ExeConfigurationFileMap.cs (ctor): init all the strings to "".
929
930 2005-07-01  Lluis Sanchez Gual  <lluis@novell.com>
931
932         * ProviderSettings.cs: Implemented properties using property attributes.
933         * ConfigurationElement.cs: Implemented ElementInformation property and
934         moved there all value management.
935         * ProtectedConfigurationProvider.cs: Set the correct base class.
936         * SectionInformation.cs: Added missing AllowExeDefinition property.
937         * TimeSpanValidatorAttribute.cs: Implemented.
938         * StringValidator.cs: Implemented.
939         * ProviderSettingsCollection.cs: Added missing class attribute.
940         * ConfigurationSaveMode.cs: Fix enum values.
941         * ConfigurationElementCollection.cs: Added Init method for initializing
942         elements from properties.
943         * StringValidatorAttribute.cs: Implemented.
944         * ConfigurationLocation.cs: Added support for allowOverride flag.
945         * TimeSpanMinutesOrInfiniteConverter.cs: Created skeleton class.
946         * PositiveTimeSpanValidator.cs: Implemented.
947         * TimeSpanMinutesConverter.cs: Created skeleton class.
948         * SectionInfo.cs: Properly read, store and check the values of AllowLocation,
949         AllowDefinition and AllowExeDefinition.
950         * TimeSpanValidator.cs: Implemented.
951         * ConfigurationConverterBase.cs: Created skeleton class.
952         * InternalConfigurationHost.cs: Implemented IsDefinitionAllowed and
953         VerifyDefinitionAllowed.
954         * ConfigurationManager.cs: That class must be static.
955         * PropertyInformationCollection.cs: Implemented.
956         * Configuration.cs: Added some checks for AllowLocation, AllowDefinition and
957         so on. In Save(), don't forget to save location elements.
958         * ConfigurationProperty.cs: Keep track of collection attributes.
959         * ConfigInfo.cs: Support overrideAllowed flag.
960         * KeyValueConfigurationElement.cs: Define properties using attributes.
961         * PropertyValueOrigin.cs: implemented.
962         * PropertyInformation.cs: Mostly implemented.
963         * SectionGroupInfo.cs: Properly propagate the overrideAllowed flag.
964         * ElementInformation.cs: Mostly implemented.
965         * ConfigurationPropertyAttribute.cs: Set the correct default value.
966         * ConfigurationCollectionAttribute.cs: Implemented.
967
968 2005-06-23  Lluis Sanchez Gual <lluis@novell.com>
969
970         * SectionInfo.cs: Set the config host when loading the section.
971         * InternalConfigurationHost.cs: Implemented some basic methods.
972         * Configuration.cs: Find the correct parent for the configuration,
973         taking into accound locations and such. Use Host functions to get
974         types from names.
975         * ConfigurationLocationCollection.cs: Added find method.
976         * ConfigInfo.cs: Added Host property.
977         * InternalConfigurationFactory.cs: The InitForConfiguration calls
978         are now done in each correspoding configuration.
979         * SectionGroupInfo.cs: When reading a location element, create
980         a Configuration object for each path specified in the location.
981         * ConfigurationElementCollection.cs: Added the CreateNewElementInternal
982         method, which properly initializes the created element.
983         * ConfigurationLocation.cs: OpenConfiguration now has to read the
984         xml contents. It also has to find the correct parent configuration,
985         if it has not been specified.
986
987 2005-06-17  Lluis Sanchez Gual <lluis@novell.com>
988
989         * SectionInfo.cs, ConfigInfo.cs, SectionGroupInfo.cs: Minor api fixes.
990         * ConfigurationPropertyCollection.cs: Added Clear method.
991         * ContextInformation.cs: Implemented.
992         * ConfigurationManager.cs: Implemented some missing methods.
993         Configuration objects are now created through the ConfigurationFactory.
994         * InternalConfigurationHost.cs: Implementation of IInternalConfigHost
995         to be used for exe files and machine.config.
996         * ConfigurationFileMap.cs: Implemented.
997         * Configuration.cs: Read and write config files using the methods that
998           IInternalConfigHost provides.
999         * InternalConfigurationRoot.cs: IInternalConfigRoot stub.
1000         * ExeContext.cs: Implemented.
1001         * AppSettingsSection.cs: Use the KeyValueConfigurationCollection
1002         collection to store values.
1003         * KeyValueConfigurationElement.cs: Implemented.
1004         * KeyValueConfigurationCollection.cs: Implemented.
1005         * InternalConfigurationFactory.cs: An implementation of 
1006         IInternalConfigConfigurationFactory.
1007         * ConfigurationPropertyAttribute.cs: Added missing attributes.
1008         * ExeConfigurationFileMap.cs: Implemented.
1009
1010 2005-06-15  Lluis Sanchez Gual <lluis@novell.com>
1011
1012         * ConfigurationElement.cs, ConfigurationErrorsException.cs
1013         SectionInfo.cs, ConnectionStringSettingsCollection.cs,
1014         ConfigurationPropertyCollection.cs, ProtectedConfigurationProvider.cs,
1015         ConfigurationSection.cs, NonEmptyStringConfigurationProperty.cs,
1016         ConfigurationElementCollectionType.cs, Configuration.cs, 
1017         ConnectionStringSettings.cs, ConfigurationProperty.cs,
1018         ConfigurationLocationCollection.cs, TimeSpanConfigurationProperty.cs,
1019         ConfigurationAllowDefinition.cs, ConfigInfo.cs,
1020         ConfigurationSectionGroupCollection.cs, AppSettingsSection.cs,
1021         ProviderSettingsCollection.cs, IntegerConfigurationProperty.cs,
1022         SectionGroupInfo.cs, ConfigurationUserLevel.cs,
1023         ConnectionStringsSection.cs, ConfigurationPropertyAttribute.cs,
1024         ConfigurationLocation.cs, ConfigurationSectionCollection.cs,
1025         ConfigurationSectionGroup.cs, RuntimeOnlySection.cs,
1026         ProviderSettings.cs: 
1027                 Track API changes.
1028         
1029         * ConfigurationElementCollection.cs: Implemented support for Basic
1030         collection type. Other fixes.
1031         
1032         * ConfigurationPropertyFlags.cs: Renamed to ConfigurationPropertyOptions.
1033         * ConfigurationUpdateMode.cs: Renamed to ConfigurationSaveMode.
1034         
1035         * SectionInformation.cs, ConfigurationAllowExeDefinition.cs
1036         ConfigurationManager.cs, ConfigurationSaveMode.cs,
1037         ConfigurationValidatorAttribute.cs, ProtectedConfigurationSection.cs,
1038         ConfigurationValidatorBase.cs, ConfigurationPropertyOptions.cs:
1039                 New files.
1040         
1041         * ConfigurationValidationAttribute.cs: Removed.
1042         
1043         * ProviderBase.cs: Moved to System.dll.
1044
1045 2005-06-14  Lluis Sanchez Gual <lluis@novell.com>
1046
1047         * AppSettingsSection.cs, ConfigInfo.cs, Configuration.cs
1048         ConfigurationAllowDefinition.cs, ConfigurationElement.cs
1049         ConfigurationElementCollection.cs, ConfigurationElementCollectionType.cs
1050         ConfigurationLocation.cs, ConfigurationLocationCollection.cs
1051         ConfigurationProperty.cs, ConfigurationPropertyAttribute.cs
1052         ConfigurationPropertyCollection.cs, ConfigurationPropertyFlags.cs
1053         ConfigurationSection.cs, ConfigurationSectionCollection.cs
1054         ConfigurationSectionGroup.cs, ConfigurationSectionGroupCollection.cs
1055         ConfigurationUpdateMode.cs, ConfigurationUserLevel.cs
1056         ConfigurationValidationAttribute.cs, ConnectionStringsSection.cs
1057         ConnectionStringSettingsCollection.cs, ConnectionStringSettings.cs
1058         IntegerConfigurationProperty.cs, NonEmptyStringConfigurationProperty.cs
1059         NonEmptyStringFlags.cs, PathLevel.cs, ProtectedConfigurationProvider.cs
1060         ProviderBase.cs, ProviderSettings.cs, ProviderSettingsCollection.cs
1061         RuntimeOnlySection.cs, SectionInfo.cs, SectionGroupInfo.cs
1062         TimeSpanConfigurationProperty.cs, TimeSpanPropertyFlags.cs
1063         TimeSpanSerializedFormat.cs:
1064
1065         Moved from the System assembly.