Author: spouliot
Date: 2006-08-28 16:58:23 -0400 (Mon, 28 Aug 2006)
New Revision: 64497

Modified:
   trunk/cecil/gendarme/console/ChangeLog
   trunk/cecil/gendarme/console/ConsoleRunner.cs
Log:
2006-08-28  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * ConsoleRunner.cs: Fix exception when rules.xml contains XML 
        comments. Patch by Christian Birkl.



Modified: trunk/cecil/gendarme/console/ChangeLog
===================================================================
--- trunk/cecil/gendarme/console/ChangeLog      2006-08-28 20:55:26 UTC (rev 
64496)
+++ trunk/cecil/gendarme/console/ChangeLog      2006-08-28 20:58:23 UTC (rev 
64497)
@@ -1,3 +1,8 @@
+2006-08-28  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * ConsoleRunner.cs: Fix exception when rules.xml contains XML 
+       comments. Patch by Christian Birkl.
+
 2006-07-31  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * console.mdp: New. Project file for MonoDevelop.

Modified: trunk/cecil/gendarme/console/ConsoleRunner.cs
===================================================================
--- trunk/cecil/gendarme/console/ConsoleRunner.cs       2006-08-28 20:55:26 UTC 
(rev 64496)
+++ trunk/cecil/gendarme/console/ConsoleRunner.cs       2006-08-28 20:58:23 UTC 
(rev 64497)
@@ -124,10 +124,10 @@
                        return false;
 
                bool result = false;
-               foreach (XmlElement ruleset in doc.DocumentElement) {
+               foreach (XmlElement ruleset in 
doc.DocumentElement.SelectNodes("ruleset")) {
                        if (ruleset.Attributes["name"].Value != set)
                                continue;
-                       foreach (XmlElement assembly in ruleset) {
+                       foreach (XmlElement assembly in 
ruleset.SelectNodes("rules")) {
                                string include = GetAttribute (assembly, 
"include", "*");
                                string exclude = GetAttribute (assembly, 
"exclude", String.Empty);
                                string from = GetFullPath (GetAttribute 
(assembly, "from", String.Empty));

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to