http://bugzilla.novell.com/show_bug.cgi?id=573502
http://bugzilla.novell.com/show_bug.cgi?id=573502#c1 Atsushi Enomoto <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Atsushi Enomoto <[email protected]> 2010-01-27 06:25:46 UTC --- Not sure if it was broken in 2.6, but the sample above works fine in trunk. Since the sample is bogus and does not compile, I rewrote it as below to examine if the bug is valid: //-------- using System; using System.Collections.Generic; using System.IO; using System.Runtime.Serialization; using System.Xml; [Serializable] public enum DBDriver { SQLite = 1, MySQL = 2, Oracle = 3, Postgresql = 4, SQLServer = 5 } [Serializable] [DataContract] public class DBConnectionInfo //: IComparable<DBConnectionInfo> { [DataMember] public long ConnectionId { get; set; } [DataMember] public string ConnectionName { get; set; } [DataMember] public DBDriver Driver { get; set; } [DataMember] public string Host { get; set; } [DataMember] public int Port { get; set; } [DataMember] public string Username { get; set; } [DataMember] public string Password { get; set; } [DataMember] public string DatabaseName { get; set; } [DataMember] public string DBFilePath { get; set; } //.... } [Serializable] [DataContract] public class Config { [DataMember] public string DefaultConnectionName {get;set;} [DataMember] public string RepoConnectionName {get;set;} public string TempFolder {get;set;} public string ConfigFilePath {get;set;} private List<DBConnectionInfo> _DBConnections; [DataMember] public List<DBConnectionInfo> DBConnections { get { if (_DBConnections == null) _DBConnections = new List<DBConnectionInfo>(); return _DBConnections; } private set { _DBConnections = value; } } } public class TESt { public static void Main (string [] args) { string configFilePath= args [0]; DataContractSerializer serz = new DataContractSerializer(typeof(Config)); using (FileStream fs = new FileStream(configFilePath, FileMode.Open)) { using (XmlDictionaryReader xmlReader = XmlDictionaryReader.CreateTextReader(fs, new XmlDictionaryReaderQuotas())) { serz.ReadObject(xmlReader); } } } } //------- -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
