Commit Graph
339 Commits
Author SHA1 Message Date
Gonzalo Paniagua Javier ea9d02d719 2008-12-22 Gonzalo Paniagua Javier <[email protected]>
* Configuration.cs: don't try to open the file if we know it does not
	exist. Also, don't hide the actual exception in case there's a problem
	opening the configuration file.


svn path=/trunk/mcs/; revision=122004
2008-12-22 20:31:49 +00:00
Marek Habersack 0195fb4796 Reverting r121536
svn path=/trunk/mcs/; revision=121552
2008-12-15 21:42:52 +00:00
Marek Habersack 7742230a75 2008-12-15 Marek Habersack <[email protected]>
* Configuration.cs: do not reset empty sections - it results in
	the elements from the parent sections being re-added to the
	current section with their default values which, in turn, can lead
	to duplicate keys being added to the collections in some cases.

svn path=/trunk/mcs/; revision=121536
2008-12-15 19:16:27 +00:00
Gonzalo Paniagua Javier 6814304afb 2008-11-15 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationManager.cs: the config file name is arbitrary.
	(Standalone test t46)


svn path=/trunk/mcs/; revision=118939
2008-11-15 18:12:19 +00:00
Gonzalo Paniagua Javier d3c99dc19a 2008-11-10 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationManager.cs: when we're dealing with an EXE hosted
	application, the configuration file is the one for the AppDomain,
	otherwise we might try to get a config file for a dll. Fixes the
	regression in 2.0 sys.config.


svn path=/trunk/mcs/; revision=118410
2008-11-10 20:46:00 +00:00
Gonzalo Paniagua Javier 01f4f3c0fa revert
svn path=/trunk/mcs/; revision=117575
2008-10-31 17:48: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 c52dbbeb8b * ConfigurationManagerTest.cs: Added test for bug #323622.
svn path=/trunk/mcs/; revision=112960
2008-09-14 16:57:52 +00:00
Gert Driesen 4323fbeaeb Moved ProviderCollectionTest.cs from System assembly to System.Configuration.
svn path=/trunk/mcs/; revision=112950
2008-09-14 12:17:43 +00:00
Gert Driesen cbe103cb5c added test for bug #413203.
svn path=/trunk/mcs/; revision=109501
2008-08-02 20:13:16 +00:00
Marek Safar 99f5f84f07 Warnings cleanup.
svn path=/trunk/mcs/; revision=107705
2008-07-11 08:42:47 +00:00
Marek Habersack e247418668 2008-07-09 Marek Habersack <[email protected]>
* ConfigurationManager.cs: implemented a work-around for
	OpenExeConfiguration ("") not working with ASP.NET apps properly.

svn path=/trunk/mcs/; revision=107569
2008-07-09 17:20:29 +00:00
Rodrigo Kumpera ce2a89b5fa 2008-07-07 Rodrigo Kumpera <[email protected]>
* ConfigurationManager.cs: Return the right path if the calling assembly is
	not null. This happens when ConfigurationSession::GetRuntimeObject() is
	called, SectionHandler != null and the handler itself calls
	OpenExeConfigurationInternal ("").


svn path=/trunk/mcs/; revision=107427
2008-07-07 22:29:35 +00:00
Rodrigo Kumpera a421cd3749 * ConfigurationManager.cs: Reaply the patch from Gert.
This change doesn't contain any fix to to not clutter
	the commit history.

2008-07-07  Rodrigo Kumpera  <[email protected]>

	* ClientConfigurationSystem.cs:

svn path=/trunk/mcs/; revision=107426
2008-07-07 22:25:55 +00:00
Rodrigo Kumpera 22ead8e533 In .:
2008-07-07  Rodrigo Kumpera  <[email protected]>

	* ClientConfigurationSystem.cs:
	* ConfigurationManager.cs: The previous patch since it
	causes a regression. It will remain reverted until we figure
	out what's wrong and how to fix it.


svn path=/trunk/mcs/; revision=107376
2008-07-07 12:51:19 +00:00
Gert Driesen 42d71e4219 * ConfigurationManagerTest.cs: Added/improved tests for
OpenExeConfiguration. Enabled tests that were previously failed. 
* ClientConfigurationSystem.cs: Moved logic for defaulting to
configuration file of AppDomain to OpenExeConfigurationInternal.
* ConfigurationManager.cs (OpenExeConfigurationInternal):
Allow calling_assembly and exePath to be null. When userLevel is None,
default to configuration file of AppDomain if exePath is null or empty.
When exePath is specified, resolve it to absolute path and throw
ConfigurationErrorsException if exePath does not exist and add
.config extension to get config file name if exePath does exist.

svn path=/trunk/mcs/; revision=107080
2008-07-02 18:02:18 +00:00
Gert Driesen 76894bdd86 * t46.cs: Improve test coverage.
svn path=/trunk/mcs/; revision=107050
2008-07-02 10:46:41 +00:00
Gert Driesen 37aab507c8 * Makefile: added test t46.
* t46.cs, t46-lib.cs: added test for bug #405574.
* t46.exe.config, t46.exe.config2: config files for t46.
* t46.exe.expected: expected result for t46.

svn path=/trunk/mcs/; revision=107049
2008-07-02 10:26:50 +00:00
Miguel de Icaza 2709c912f0 2008-07-01 Miguel de Icaza <[email protected]>
* ConfigurationManager.cs (OpenExeConfigurationInternal): if the
	string passed is empty, then we default to the startup assembly.

	Fixes: #405574

	Not entirely happy as there is no decent documentation for this
	behavior (the docs state nothing about empty strings). 

svn path=/trunk/mcs/; revision=107019
2008-07-02 00:28:35 +00:00
Atsushi Eno 5535c3f683 2008-06-27 Atsushi Enomoto <[email protected]>
* ConfigurationErrorsExceptionTest.cs : actually
          remove ignored tests.


svn path=/trunk/mcs/; revision=106790
2008-06-28 00:07:56 +00:00
Atsushi Eno 0c6f8225a7 2008-06-27 Atsushi Enomoto <[email protected]>
* SectionInfo.cs, Configuration.cs, ConfigInfo.cs,
          SectionGroupInfo.cs :
          eliminate XmlTextReader, first stage.


svn path=/trunk/mcs/; revision=106778
2008-06-27 21:03:18 +00:00
Atsushi Eno c9627ec868 2008-06-27 Atsushi Enomoto <[email protected]>
* ConfigurationErrorsException.cs : recover from
          silly change that tries to prevent debuggin by
          decreasing error location information.

        * ConfigurationErrorsExceptionTest.cs : mark couple
          of tests as [Ignore] that blocks us from decent
          implementation in the name of silly .NET compatibility.

        Maybe I'll remove more silliness later.


svn path=/trunk/mcs/; revision=106776
2008-06-27 20:45:49 +00:00
Gert Driesen 590868c044 * ConfigurationErrorsExceptionTest.cs: Added tests for ctors and
GetFilename/GetLineNumber overloads.
* System.Configuration_test.dll.sources: added
ConfigurationErrorsExceptionTest.cs.
* System.Configuration.dll.sources: added ConfigXmlTextReader.cs.
* ConfigurationElement.cs: Use ConfigurationErrorsException instead of
ConfigurationException, and pass reader to ConfigurationErrorsException
ctor to allow for file/linenumber info in exception message.
* ConfigurationErrorsException.cs: Removed local bareMessage field, and
use base.BareMessage field instead. Fixed Message property to only add
filename if not null or zero-length string, and only add line if not
zero. In GetFilename/GetLineNumber overloads, only try to get info if
node/reader implements IConfigErrorInfo.
* ConfigurationSection.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* ConfigXmlTextReader.cs: Added XmlTextReader that implements 
IConfigErrorInfo.
* ConfigurationLocation.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* ClientConfigurationSystem.cs: Perform lazy initialization and
wrap exceptions in ConfigurationErrorsException. Fixes standalone test
t28.
* Configuration.cs: Use ConfigXmlTextReader instead of XmlTextReader
to allow for file/linenumber info in exception messages.
* ConfigInfo.cs: Fixed ThrowException to use file/number info available
in XmlTextReader for exception message.
* AppSettingsSection.cs: Use ConfigXmlTextReader instead of
XmlTextReader to allow for file/linenumber info in exception messages.
* Assert.cs: added.
* Makefile: added Assert.cs, and explicitly specify output file.
* t28.cs: Improved test.

svn path=/trunk/mcs/; revision=106626
2008-06-26 10:31:07 +00:00
Jb Evain 3b0d913c99 2008-06-19 Jb Evain <[email protected]>
* ConfigurationPermissionAttribute.cs (CreatePermission): implement.


svn path=/trunk/mcs/; revision=106210
2008-06-19 14:26:12 +00:00
Marek Habersack 1cb04f74e9 2008-05-28 Marek Habersack <[email protected]>
* Configuration.cs: set the ConfigContext when getting
        and instance of a section. Fix for bug #325128.

        * ConfigurationSection.cs: added an internal property -
        ConfigContext used to supply the HttpContext to the Create
        method of SectionHandler when called from GetRuntimeObject.
        Fix for bug #325128.

        * InternalConfiguationHost.cs: changed CreateDeprecatedConfigContext
        to return null rather than throwing a NotImplementedException.
        Fix for bug #325128.

        * All patches above contributed by James Fitzsimons <[email protected]>,
          thanks!

svn path=/trunk/mcs/; revision=104331
2008-05-28 21:22:57 +00:00
Sebastien Pouliot 073c560cee 2008-05-18 Sebastien Pouliot <[email protected]>
* SectionGroupInfo.cs: Use String.IsNullOrEmpty inside 2.0 code.
	[Found using Gendarme]


svn path=/trunk/mcs/; revision=103422
2008-05-18 16:16:00 +00:00
Sebastien Pouliot cd7cc7a38b 2008-05-18 Sebastien Pouliot <[email protected]>
* ProviderBase.cs: Use String.IsNullOrEmpty inside 2.0 code.
	[Found using Gendarme]


svn path=/trunk/mcs/; revision=103421
2008-05-18 16:15:24 +00:00
Roei Erez e1417f0648 fix loading a SectionGroup without any section child.
svn path=/trunk/mcs/; revision=102968
2008-05-11 15:45:57 +00:00
Gonzalo Paniagua Javier 6cf05d9702 2008-05-05 Gonzalo Paniagua Javier <[email protected]>
* ConfigurationElement.cs: don't fail when a mandatory property is a
	configuration element itself.


svn path=/trunk/mcs/; revision=102578
2008-05-06 01:29:56 +00:00
Marek Habersack 832187b025 2008-04-30 Marek Habersack <[email protected]>
* ConfigurationElement.cs: HasLocalModifications considers a
	property modifed locally if its origin is SetHere and it's been
	marked as modified.

svn path=/trunk/mcs/; revision=102162
2008-04-29 22:47:53 +00:00
Andreas N d214a89a2c 2008-04-15 Andreas Nahr <[email protected]>
* AssemblyInfo.cs: Added missing attributes

svn path=/trunk/mcs/; revision=100730
2008-04-15 15:44:13 +00:00
Noam Lampert 9b048b7d2e Upgrade to Visual Studio 2008
svn path=/trunk/mcs/; revision=99007
2008-03-26 08:16:52 +00:00
Igor Zelmanovich cfb6919827 svn path=/trunk/mcs/; revision=98681 2008-03-20 16:09:49 +00:00
Igor Zelmanovich 82a6f129b0 2008-03-20 Igor Zelmanovich <[email protected]>
* Configuration.cs:
	* ConfigurationElement.cs:
	implement EvaluationContext property.		


svn path=/trunk/mcs/; revision=98680
2008-03-20 16:08:17 +00:00
Marek Habersack 6635f9ff72 2008-03-01 Marek Habersack <[email protected]>
* SectionInformation.cs: added an internal property -
	ConfigFilePath, used when deserializing a section in
	ConfigurationSection.GetRuntimeObject.

	* Configuration.cs: set SectionInformation.ConfigFilePath when
	getting an instance of a section.

	* ConfigurationSection.cs: support the 'configSource' attribute
	when section is read through GetRuntimeObject.

svn path=/trunk/mcs/; revision=97049
2008-03-01 02:24:56 +00:00
Marek Habersack 54aad1d723 2008-02-21 Marek Habersack <[email protected]>
* Configuration.cs: if the section being deserialized uses the
	configSource attribute, call the section's DeserializeConfigSource
	method.

	* SectionInfo.cs: WriteData takes care of writing the section data
	to the configSource file, if any.

	* ConfigurationSection.cs: moved reading of the configSource
	external data file to a separate internal method,
	DeserializeConfigSource. Section's source config file path is now
	used to find the configSource.
	SerializeSection now doesn't write the section content to the
	passed writer if configSource was used. Writing of the section
	data is now done in SectionInfo.

	* ConfigurationElement.cs: added a new method -
	HasLocalModifications which returns true of any of the element
	properties have been set locally on that element.

svn path=/trunk/mcs/; revision=96384
2008-02-21 18:28:35 +00:00
Marek Habersack 2d3956e8de 2008-02-20 Marek Habersack <[email protected]>
* ConfigurationSection.cs: support the "configSource" attribute
	when deserializing a section. Contents of the file (if it exists)
	replaces the previous section contents.

	* ConfigurationElement.cs: ignore the "configSource" attribute if we're a
	ConfigurationSection instance.
	HasValues () returns true only if any of the properties has the
	origin set to SetHere.

svn path=/trunk/mcs/; revision=96296
2008-02-20 19:46:40 +00:00
Konstantin Triger aeb1871348 performance: refactor out the Configuration object construction from GetSection() to the ctor
svn path=/trunk/mcs/; revision=95121
2008-02-07 07:15:16 +00:00
Igor Zelmanovich 221bb45ab1 fix exception propagation
svn path=/trunk/mcs/; revision=94382
2008-01-30 14:57:10 +00:00
Zoltan Varga f9801d39ef 2008-01-16 Zoltan Varga <[email protected]>
* ConfigurationElement.cs: Allow non-public constructors. Fixes #353554.

svn path=/trunk/mcs/; revision=93007
2008-01-16 00:21:09 +00:00
Zoltan Varga 0888ca8ea8 2008-01-16 Zoltan Varga <[email protected]>
* PropertyInformation.cs: Allow non-public constructors. Fixes #353557.

svn path=/trunk/mcs/; revision=93006
2008-01-16 00:17:22 +00:00
Zoltan Varga 81b4594d60 2008-01-16 Zoltan Varga <[email protected]>
* ConfigurationElement.cs: Consider non-public properties as well. Fixes
	#353553.

svn path=/trunk/mcs/; revision=93000
2008-01-15 23:47:01 +00:00
Sebastien Pouliot 06b2a1426e 2008-01-12 Sebastien Pouliot <[email protected]>
* ConfigurationLocationCollection.cs: Avoid infinite recursion. 
	Found using Gendarme.


svn path=/trunk/mcs/; revision=92757
2008-01-12 17:36:22 +00:00
Konstantin Triger 463fe4b128 properly override NameValueCollection to support interop with it
svn path=/trunk/mcs/; revision=91960
2007-12-27 18:51:37 +00:00
Konstantin Triger 847bc730fa typo - pass the correct property to Attribute.GetCustomAttribute; Pass oroginal exception as inner
svn path=/trunk/mcs/; revision=91871
2007-12-25 07:12:08 +00:00
Noam Lampert 078bfb7274 Build java configuration using RT of JRE 1.4.2 for support of older java systems
svn path=/trunk/mcs/; revision=91221
2007-12-13 12:01:56 +00:00
Marek Habersack 1a3a14355b forgot to commit the changelog
svn path=/trunk/mcs/; revision=90759
2007-12-05 13:13:09 +00:00
Marek Habersack 15c1349853 2007-12-05 Marek Habersack <[email protected]>
* ConfigurationElement.cs: some property values may be null
	objects in GetHashCode.

svn path=/trunk/mcs/; revision=90758
2007-12-05 13:12:41 +00:00
Marek Habersack cf709f6147 2007-11-23 Marek Habersack <[email protected]>
* ConfigurationElementCollection.cs: ThrowOnDuplicate returns true
	if the collection is one of the AddRemoveClearMap or
	AddRemoveClearMapAlternate types.

svn path=/trunk/mcs/; revision=90207
2007-11-23 01:00:25 +00:00
Arina Itkes daa0a24c3e TARGET_JVM: replacing config file name to actual
svn path=/trunk/mcs/; revision=90154
2007-11-22 13:34:19 +00:00