Commit Graph
156 Commits
Author SHA1 Message Date
Carlos Alberto Cortez 81317df205 2010-02-16 Carlos Alberto Cortez <[email protected]>
* CustomizableLocalFileSettingsProvider.cs: When saving the
	properties, ignore the properties marked with
	ApplicationScopedSettingAttribute, as they are not serialized in .net 
	by FileSettingsProvider (the default class used to save the config,
	and the one using the class we are modifying).
	Fixes #468658.


svn path=/trunk/mcs/; revision=151798
2010-02-16 13:12:50 +00:00
Carlos Alberto Cortez b6fdd83c60 2010-02-12 Carlos Alberto Cortez <[email protected]>
* CustomizableLocalFileSettingsProvider.cs: The name of the child
	class of Settings should be 'normalized' by replacing the chars that
	are invalid in a xml element name with their corresponding hexadecimal
	values. This is specially visible when using classes container in
	other classes.
	Fixes #471289.


svn path=/trunk/mcs/; revision=151607
2010-02-12 12:16:08 +00:00
Gonzalo Paniagua Javier f272f2d0a7 2009-08-31 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: reset the property value
	instead of using the DefaultValue.
	* SettingsPropertyValue.cs: new Reset() method.
	* ApplicationSettingsBase.cs: Reset happens in Reload().
	Patch by Andrew Kurochka that fixes bug #532180.


svn path=/trunk/mcs/; revision=140950
2009-08-31 09:20:07 +00:00
Gonzalo Paniagua Javier 664c12c8d8 2009-06-18 Gonzalo Paniagua Javier <[email protected]>
* IriParsingElement.cs:
	* UriSection.cs:
	* IdnElement.cs: new files that parse <uri> and subelements.


svn path=/trunk/mcs/; revision=136437
2009-06-18 20:31:47 +00:00
Marek Safar ba5939a531 2009-06-05 Marek Safar <[email protected]>
* DictionarySectionHandler.cs, NameValueSectionHandler.cs,
	NameValueFileSectionHandler.cs, SingleTagSectionHandler.cs,
	IConfigurationSectionHandler.cs, IgnoreSectionHandler.cs: Always
	build IConfigurationSectionHandler.


svn path=/trunk/mcs/; revision=135528
2009-06-05 14:20:21 +00:00
Gonzalo Paniagua Javier 052391245a 2009-05-10 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: make sure 'values' is
	initialized in Reset(). Fixes bug #436592.


svn path=/trunk/mcs/; revision=133866
2009-05-11 02:06:04 +00:00
Marek Habersack 7766743366 2009-04-03 Marek Habersack <[email protected]>
* WebConfigurationManager.cs: added code in the static constructor
	to enable retrieving application settings via
	ApplicationSettingsBase from within asp.net applications. Fixes
	bug #491531

	* ApplicationSettingsConfigurationFileMap.cs: added.

2009-04-03  Marek Habersack  <[email protected]>

	* CustomizableFileSettingsProvider.cs: added a way for System.Web
	to specify path to the current Web.config. Fixes bug #491531

svn path=/trunk/mcs/; revision=130909
2009-04-02 22:35:28 +00:00
Gonzalo Paniagua Javier 75883dc733 2008-11-20 Gonzalo Paniagua Javier <[email protected]>
* ConfigHelper.cs: allow xmlns attribute.


svn path=/trunk/mcs/; revision=119505
2008-11-20 20:36:45 +00:00
Gert Driesen 2dcef460e7 * SettingPropertyValue.cs: Do not return null for zero-length String
value.

svn path=/trunk/mcs/; revision=118927
2008-11-15 13:41:35 +00:00
Atsushi Eno cc59158ec3 2008-11-11 Atsushi Enomoto <[email protected]>
Fix for bug 439943.
        * SettingValueElement.cs : do not write value element twice.
        * CustomizableFileSettingsProvider.cs : create "value" element
          instead of a document fragment so that the output from
          SettingValueElement could become consistent.
          Null binary value caused crash. Set appropriate
          SerializedValue for each serialization type.
        * SettingsPropertyValue.cs : output only when the value is
          non-null.


svn path=/trunk/mcs/; revision=118565
2008-11-12 00:11:45 +00:00
Atsushi Eno f2b5ad3c51 2008-11-05 Atsushi Enomoto <[email protected]>
* SettingValueElement.cs, CustomizableFileSettingsProvider.cs :
	  revert previous regressive change.


svn path=/trunk/mcs/; revision=117984
2008-11-05 15:51:55 +00:00
Atsushi Eno 4baa530b64 2008-11-05 Atsushi Enomoto <[email protected]>
* SettingValueElement.cs, CustomizableFileSettingsProvider.cs :
	  Fixed bug #439943. Xml deserialization for complex content was
	  not done correctly.


svn path=/trunk/mcs/; revision=117961
2008-11-05 09:18:26 +00:00
Gonzalo Paniagua Javier 8db1078e92 revert
svn path=/trunk/mcs/; revision=117574
2008-10-31 17:47:04 +00:00
Gonzalo Paniagua Javier 23a91b586e 2008-10-31 Gonzalo Paniagua Javier <[email protected]>
* System/System.Configuration/CustomizableFileSettingsProvider.cs:
	* System/System.Configuration/ApplicationSettingsBase.cs:
	* System.Configuration/System.Configuration/ClientConfigurationSystem.cs:
	* System.Configuration/System.Configuration/ConfigurationManager.cs:
	Generate the same file name for the local settings file and properly
	save the configuration to it. Not loading it yet.


svn path=/trunk/mcs/; revision=117573
2008-10-31 17:36:16 +00:00
Gert Driesen 2b4812d44a * CustomizableFileSettingsProvider.cs (LoadPropertyValue): Do not
hide ArgumentException.

svn path=/trunk/mcs/; revision=114883
2008-10-05 09:13:33 +00:00
Gonzalo Paniagua Javier 1cd9846abc 2008-10-04 Gonzalo Paniagua Javier <[email protected]>
* CustomizableFileSettingsProvider.cs: when reading application or
	user settings, only read those settings appropriate for the context.
	This avoids duplicate key errors when 2 different groups have a key
	with the same name.
	* ApplicationSettingsBase.cs: the context is a hashtable with several
	values set upon creation: SettingsKey, GroupName and
	SettingsClassType.

	Fixes bug #432466.


svn path=/trunk/mcs/; revision=114853
2008-10-04 21:50:11 +00:00
Gonzalo Paniagua Javier 3a62ec8a81 2008-10-04 Gonzalo Paniagua Javier <[email protected]>
* ApplicationSettingsBase.cs: honor the IsSynchronized value in the
	Context, Properties, PropertyValues and Providers. All of them might
	initialize an instance field for the class. Hopefully this fixes some
	nullrefs.


svn path=/trunk/mcs/; revision=114842
2008-10-04 18:24:39 +00:00
Gonzalo Paniagua Javier cffdef0f69 2008-10-04 Gonzalo Paniagua Javier <[email protected]>
* ApplicationSettingsBase.cs: honor the IsSynchronized value in the
	indexer.


svn path=/trunk/mcs/; revision=114837
2008-10-04 16:42:47 +00:00
Raja R Harinath 8320786617 * ConfigXmlDocument.cs (Load): Fix build break in 1.1 profile.
Open code the 'using' with try/finally/Close.

svn path=/trunk/mcs/; revision=112981
2008-09-15 02:01:27 +00:00
Gert Driesen 93ff28fda8 * System_test.dll.sources: Added ConfigXmlDocumentTest.cs.
* ConfigXmlDocumentTest.cs: Added test for Load (String).
* ConfigXmlDocument.cs: Dispose XmlTextReader in Load (String).

svn path=/trunk/mcs/; revision=112958
2008-09-14 16:39:17 +00:00
Ivan Zlatev 86e2ab6d2b 2008-09-01 Ivan N. Zlatev <[email protected]>
* SettingsPropertyValue.cs: Explicitly use the Invariant culture
	instead of the current.
	[Fixes bug #374516]

svn path=/trunk/mcs/; revision=112027
2008-09-01 13:55:01 +00:00
Ivan Zlatev 646e7afef4 2008-08-05 Ivan N. Zlatev <[email protected]>
* ApplicationSettingsBase.cs: If there is no explicit
	SettingsSerializeAs attribute to specify the format, distinguish
	between plain string and XML by checking if the TypeConverter for the
	property type supports string conversions. If it doesn't then we are
	present with XML.
	[Fixes bug #414445]

svn path=/trunk/mcs/; revision=109706
2008-08-05 20:39:18 +00:00
Gert Driesen 3ff3823088 * DiagnosticsConfigurationHandler.cs: On 2.0 profile, throw
ConfigurationErrorsException when any attribute other than 'Name'
is found when referencing a shared listener. Fixes bug #404054.
Added support for the traceOutputOptions attribute on 2.0 profile.
Fixes bug #403583.
* ConfigXmlDocument.cs: Implement IConfigErrorInfo on all Node classes.

svn path=/trunk/mcs/; revision=106628
2008-06-26 10:54:00 +00:00
Gert Driesen 846e400474 * DictionarySectionHandler.cs: Fixed line endings.
* IgnoreSectionHandler.cs: Fixed line endings.

svn path=/trunk/mcs/; revision=106583
2008-06-25 17:21:30 +00:00
Gert Driesen c2e45d79b9 * ConfigurationExceptionTest.cs: Added ctor tests.
* System_test.dll.sources: Added ConfigurationExceptionTest.cs.
* ConfigurationExceptionTest.cs: Removed local bareMessage field, and
use base.Message instead. Fixed default cor to invoke String ctor of 
SystemException. Fixed Message property to only add filename if not
null or zero-length string, and only add line if not zero.

svn path=/trunk/mcs/; revision=106582
2008-06-25 17:18:35 +00:00
Atsushi Eno c8b85d4810 2008-03-21 Atsushi Enomoto <[email protected]>
* CustomizableFileSettingsProvider.cs : fix possible NRE for
          SettingsContext.Current.


svn path=/trunk/mcs/; revision=98719
2008-03-21 08:33:52 +00:00
Atsushi Eno 91ee096b4a 2008-03-21 Atsushi Enomoto <[email protected]>
* CustomizableFileSettingsProvider.cs : some hash calculation
	  improvements by the author.


svn path=/trunk/mcs/; revision=98718
2008-03-21 03:52:15 +00:00
Atsushi Eno 831474bc3b 2008-03-14 Atsushi Enomoto <[email protected]>
* CustomizableFileSettingsProvider.cs : cosmetic header fix
	  requested by the author.


svn path=/trunk/mcs/; revision=98295
2008-03-14 17:12:26 +00:00
Sebastien Pouliot 126013cbd9 2008-01-12 Sebastien Pouliot <[email protected]>
* SettingsPropertyValue.cs: Fix typo. Found using Gendarme.


svn path=/trunk/mcs/; revision=92758
2008-01-12 17:59:40 +00:00
Atsushi Eno ee6b478c4e 2007-11-21 Atsushi Enomoto <[email protected]>
* CustomizableFileSettingsProvider.cs : when a property is found
	  only in the config file and not in the corresponding config type,
	  do not raise NRE but just add it as a simple property value.
	  Fixed bug #343459.


svn path=/trunk/mcs/; revision=90108
2007-11-21 19:53:26 +00:00
Atsushi Eno 55a950c41f 2007-11-13 Atsushi Enomoto <[email protected]>
* ConfigXmlDocument.cs : corcompare cleanup.


svn path=/trunk/mcs/; revision=89529
2007-11-13 09:25:55 +00:00
Atsushi Eno d694d4f81e 2007-11-06 Atsushi Enomoto <[email protected]>
* CustomizableFileSettingsProvider.cs : Type.Namespace can be null.
	  MSDN documentation is kind of wrong here.


svn path=/trunk/mcs/; revision=88956
2007-11-06 09:43:48 +00:00
Arina Itkes e86d0f17f3 TARGET_JVM: return flow to the version before revision 80469
svn path=/trunk/mcs/; revision=88815
2007-11-04 10:30:24 +00:00
Atsushi Eno a351e7c4ea 2007-06-21 Atsushi Enomoto <[email protected]>
* SettingValueElement.cs : implement Reset().
	* CustomizableFileSettingsProvider.cs : fixed company name getter
	  and product name getter.
	  LoadPropertyValue() should expect null ValueXml.
	* LocalFileSettingsProvider.cs : time to switch. With a bit of
	  directory name difference, it should work.


svn path=/trunk/mcs/; revision=80469
2007-06-21 13:13:51 +00:00
Atsushi Eno 67e9911781 2007-06-13 Atsushi Enomoto <[email protected]>
* CustomizableLocalFileSettingsProvider.cs :
	  - added extern alias to avoid reference and I could enable
	    Initialize() again.
	  - Copied default user config path stuff (Company/Product/Version)
	    from MWF Application.cs.
	  - SaveProperties() and SavePropertiesNoRoaming() are unified, and
	    mostly rewritten to create userSettings, set value correctly, etc.
	  - GetPropertyValues() should collect default values as well.

	  It is not enabled yet, as Configuration.Save() seems to do wrong
	  and could overwrite application exe.config.


svn path=/trunk/mcs/; revision=79474
2007-06-13 18:35:58 +00:00
Atsushi Eno 6e4bd7db9e 2007-06-13 Atsushi Enomoto <[email protected]>
* SettingsContext.cs : add internal CurrentSettings property to
	  make current ApplicationSettingsBase accessible.
	* ApplicationSettingsBase.cs : use above.
	* SettingValueElement.cs : implement SerializeToXmlElement().

	* SettingElementTest.cs : test initial Value.


svn path=/trunk/mcs/; revision=79466
2007-06-13 17:50:52 +00:00
Vladimir Krasnov 4313759f85 * SettingValueElement.cs: fixed stub Properties property for System.Configuration fixes
svn path=/trunk/mcs/; revision=79259
2007-06-12 13:39:37 +00:00
Atsushi Eno 96d90229c1 2007-06-04 Atsushi Enomoto <[email protected]>
* CustomizableLocalFileSettingsProvider.cs : contribution for
	  LocalFileSettingsProvider implementation, by Noriaki Okimoto
	  ([email protected]), modified by myself to fit for System.dll.
	  Origin of code license assignment at
	  http://ojk.sppd.ne.jp/ojkblog/?date=20070603#p01.
	* LocalFileSettingsProvider.cs : rewriting to use above.

	  Due to some kind of compiler issue it is not enabled yet.

	* System.dll.sources :
	  added CustomizableLocalFileSettingsProvider.cs.


svn path=/trunk/mcs/; revision=78561
2007-06-04 14:03:54 +00:00
Atsushi Eno 2270d913b0 2007-05-30 Atsushi Enomoto <[email protected]>
* ApplicationSettingsBase.cs : removed garbage debugging stuff.


svn path=/trunk/mcs/; revision=78241
2007-05-30 17:47:05 +00:00
Atsushi Eno 8b06b7c8a2 2007-05-30 Atsushi Enomoto <[email protected]>
* ConfigXmlDocument.cs : added explicit interface implementations.
	* ApplicationSettingsBase.cs : split deeply-nested get_Properties()
	  into itself and a method. Treat default LocalFileSettingsProvider
	  as a (valid) settings provider. Removed a fixme (only public
	  members should be available).
	* SettingsBase.cs : check lock state in Save().
	* SettingsProviderCollection.cs : remove bogus table field which
	  conflicts with the table in base ProviderCollection class.


svn path=/trunk/mcs/; revision=78240
2007-05-30 17:46:17 +00:00
Atsushi Eno 9274590c24 2007-05-30 Atsushi Enomoto <[email protected]>
* SettingsBase.cs : property values are filled only when each
	  property is accessed. It should not use virtual providers,
	  properties or context internally since they could be overriden.
	* SettingsPropertyValue.cs : to serialize value as string, use
	  TypeConverter as well (as deserialization).
	* SettingsProviderCollection.cs : (Add) null arg check.

	* SettingsBaseTest.cs : new test.
	* ApplicationSettingsBaseTest.cs : added Providers().

	* System_test.dll.sources : added SettingsBaseTest.cs.


svn path=/trunk/mcs/; revision=78181
2007-05-30 10:03:57 +00:00
Atsushi Eno 50f1611d6e 2007-05-28 Atsushi Enomoto <[email protected]>
* SettingElementCollection.cs : fix build, cyclic build mess.


svn path=/trunk/mcs/; revision=78060
2007-05-28 14:25:13 +00:00
Atsushi Eno bd86f2a379 2007-05-28 Atsushi Enomoto <[email protected]>
* SettingElement.cs : fix default value (null->"").
	* SettingElementCollection.cs : implemented all.

	* SettingElementTest.cs : new test.

	* System_test.dll.sources : added SettingElementTest.cs.


svn path=/trunk/mcs/; revision=78053
2007-05-28 12:55:15 +00:00
Atsushi Eno 32f699f7ec 2007-05-28 Atsushi Enomoto <[email protected]>
* SettingsProviderAttribute.cs :
	  Return assembly qualified name. Check null args.
	* ConfigXmlDocument.cs : it implements IConfigErrorInfo.

	* ApplicationSettingsBaseTest.cs : enable working test.


svn path=/trunk/mcs/; revision=78043
2007-05-28 10:31:33 +00:00
Vladimir Krasnov 0ad9d70d19 * SettingsPropertyValue.cs: fixed binary deserealization that may be present as base64 string
svn path=/trunk/mcs/; revision=74389
2007-03-15 15:50:52 +00:00
Gert Driesen 863985be10 * ConfigurationSettings.cs: On 2.0 profile, use ConfigurationManager
to retrieve config section. Fixes bug #81020.

svn path=/trunk/mcs/; revision=73657
2007-03-03 14:20:58 +00:00
Miguel de Icaza 0f38908979 2007-01-22 Miguel de Icaza <[email protected]>
* SettingsBase.cs: Removed a NotImplementedException, it provides
	a default Save implementation. 

svn path=/trunk/mcs/; revision=71456
2007-01-22 20:11:06 +00:00
Vladimir Krasnov 0351fb9bb7 fixed IsDirty Property, added tests for IsDirty Property
svn path=/trunk/mcs/; revision=70991
2007-01-14 17:36:58 +00:00
Vladimir Krasnov 94ef49cd16 * SettingsPropertyValue.cs: fixed PropertyValue, default value of SettingsProperty should be desirialized or created
svn path=/trunk/mcs/; revision=70665
2007-01-08 17:07:52 +00:00
Miguel de Icaza 9b5517a743 2007-01-03 Tor Lillqvist <[email protected]>
Add the possibility to bundle also the machine.config file, from
	#80305.

	* mkbundle.cs: Add option --machine-config. Warn the user that a
	bundled machine.config file should be checked that it doesn't
	contain sensitive data like private machine keys.

	If that option was used, write the contents of the machine.config
	file to the asm output file, and write code to call
	mono_register_machine_config() with the data to the C output file.


svn path=/trunk/mcs/; revision=70489
2007-01-04 17:08:48 +00:00