* 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
* 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
* 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
* 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
* ConfigurationManager.cs: implemented a work-around for
OpenExeConfiguration ("") not working with ASP.NET apps properly.
svn path=/trunk/mcs/; revision=107569
* 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
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 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
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
* 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
* 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
* 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
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
* 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
* 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
* 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
* 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
* 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
* ConfigurationElementCollection.cs: ThrowOnDuplicate returns true
if the collection is one of the AddRemoveClearMap or
AddRemoveClearMapAlternate types.
svn path=/trunk/mcs/; revision=90207