[Monodevelop-patches-list] r445 - trunk/MonoDevelop/src/Main/Core/AddIns

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Sun Jan 11 14:47:24 EST 2004


Author: benm
Date: 2004-01-11 14:47:24 -0500 (Sun, 11 Jan 2004)
New Revision: 445

Modified:
   trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs
Log:
done use xpath when you dont need to

Modified: trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs	2004-01-11 19:22:29 UTC (rev 444)
+++ trunk/MonoDevelop/src/Main/Core/AddIns/AddIn.cs	2004-01-11 19:47:24 UTC (rev 445)
@@ -236,7 +236,7 @@
 		/// Autoinitialized all fields of the customizer object to the values
 		/// in the codonNode using the XmlMemberAttributeAttribute.
 		/// </summary>
-		void AutoInitializeAttributes(object customizer, XmlNode codonNode)
+		void AutoInitializeAttributes(object customizer, XmlElement codonNode)
 		{
 			Type currentType = customizer.GetType();
 			while (currentType != typeof(object)) {
@@ -248,7 +248,7 @@
 					
 					if (codonAttribute != null) {
 						// get value from xml file
-						XmlNode node = codonNode.SelectSingleNode("@" + codonAttribute.Name);
+						XmlNode node = codonNode.Attributes [codonAttribute.Name];
 						
 						// check if its required
 						if (node == null && codonAttribute.IsRequired) {
@@ -274,7 +274,7 @@
 					
 					if (codonArrayAttribute != null) {
 						// get value from xml file
-						XmlNode node = codonNode.SelectSingleNode("@" + codonArrayAttribute.Name);
+						XmlNode node = codonNode.Attributes [codonArrayAttribute.Name];
 						
 						// check if its required
 						if (node == null && codonArrayAttribute.IsRequired) {




More information about the Monodevelop-patches-list mailing list