capuchin r56 - in trunk/src/libcapuchin: . Xml
- From: sebp svn gnome org
- To: svn-commits-list gnome org
- Subject: capuchin r56 - in trunk/src/libcapuchin: . Xml
- Date: Fri, 7 Mar 2008 21:32:09 +0000 (GMT)
Author: sebp
Date: Fri Mar 7 21:32:09 2008
New Revision: 56
URL: http://svn.gnome.org/viewvc/capuchin?rev=56&view=rev
Log:
Don't make the author class a sub-class of Dictionary
Modified:
trunk/src/libcapuchin/AppObject.cs
trunk/src/libcapuchin/Xml/Repository.cs
trunk/src/libcapuchin/Xml/author.cs
Modified: trunk/src/libcapuchin/AppObject.cs
==============================================================================
--- trunk/src/libcapuchin/AppObject.cs (original)
+++ trunk/src/libcapuchin/AppObject.cs Fri Mar 7 21:32:09 2008
@@ -78,6 +78,7 @@
);
this.RepoItems = null;
+ this.DownloadToPluginId = null;
this.disposed = true;
GC.SuppressFinalize(this);
}
@@ -247,7 +248,7 @@
Log.Info("Getting author of plugin with id '{0}'", plugin_id);
author plugin_author = this.RepoItems[plugin_id].Author;
- return new string[] { plugin_author["name"], plugin_author["email"] };
+ return new string[] { plugin_author.Name, plugin_author.Email };
}
/// <summary>Tell the object that it isn't needed anymore</summary>
Modified: trunk/src/libcapuchin/Xml/Repository.cs
==============================================================================
--- trunk/src/libcapuchin/Xml/Repository.cs (original)
+++ trunk/src/libcapuchin/Xml/Repository.cs Fri Mar 7 21:32:09 2008
@@ -7,6 +7,7 @@
[XmlRootAttribute(ElementName="repository", Namespace="", IsNullable=false)]
public class Repository
{
+ [XmlElementAttribute("application")]
public string application;
[XmlElementAttribute("installpath")]
Modified: trunk/src/libcapuchin/Xml/author.cs
==============================================================================
--- trunk/src/libcapuchin/Xml/author.cs (original)
+++ trunk/src/libcapuchin/Xml/author.cs Fri Mar 7 21:32:09 2008
@@ -1,33 +1,18 @@
using System;
using System.Xml;
using System.Xml.Serialization;
-using System.Collections.Generic;
namespace Capuchin.Xml
{
[XmlRootAttribute(ElementName="author", Namespace = "", IsNullable = false)]
- public class author : Dictionary<string, string>, IXmlSerializable
+ public class author
{
- public System.Xml.Schema.XmlSchema GetSchema()
- {
- return null;
- }
-
- public void ReadXml(XmlReader reader)
- {
- reader.MoveToAttribute("name");
- this.Add("name", reader.Value);
-
- reader.MoveToAttribute("email");
- this.Add("email", reader.Value);
- }
-
- public void WriteXml(XmlWriter writer)
- {
- writer.WriteAttributeString("name", this["name"]);
- writer.WriteAttributeString("email", this["email"]);
- }
+ [XmlAttributeAttribute("name", typeof(string))]
+ public string Name;
+
+ [XmlAttributeAttribute("email", typeof(string))]
+ public string Email;
}
-}
+}
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]