// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
-#if NET_2_0
using System;
using System.ComponentModel;
using System.Collections.Specialized;
return Settings.IsModified ();
}
- [MonoTODO ("file path? do we use a System.Configuration api for opening it? do we keep it open? do we open it writable?")]
+ [MonoInternalNote ("file path? do we use a System.Configuration api for opening it? do we keep it open? do we open it writable?")]
protected internal override void DeserializeElement (XmlReader reader, bool serializeCollectionKey)
{
/* need to do this so we pick up the File attribute */
if (File != "") {
try {
- Stream s = System.IO.File.OpenRead (File);
- XmlReader subreader = new XmlTextReader (s);
+ string filePath = File;
+ if (!Path.IsPathRooted (filePath))
+ filePath = Path.Combine (Path.GetDirectoryName (Configuration.FilePath), filePath);
+
+ Stream s = System.IO.File.OpenRead (filePath);
+ XmlReader subreader = new ConfigXmlTextReader (s, filePath);
base.DeserializeElement (subreader, serializeCollectionKey);
s.Close ();
}
[MonoTODO]
protected internal override string SerializeSection (
- ConfigurationElement parent, string name, ConfigurationSaveMode mode)
+ ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
{
if (File == "") {
- return base.SerializeSection (parent, name, mode);
+ return base.SerializeSection (parentElement, name, saveMode);
}
else {
throw new NotImplementedException ();
}
}
}
-#endif