Author: spouliot
Date: 2006-11-06 19:10:43 -0500 (Mon, 06 Nov 2006)
New Revision: 67421

Added:
   trunk/cecil/gendarme/framework/MessageType.cs
Modified:
   trunk/cecil/gendarme/framework/ChangeLog
   trunk/cecil/gendarme/framework/Makefile.am
   trunk/cecil/gendarme/framework/Message.cs
   trunk/cecil/gendarme/framework/framework.mdp
Log:
2006-11-06  Sebastien Pouliot  <[EMAIL PROTECTED]>

        * framework.mdp: Update to add new file.
        * Makefile.am: Update to add new file.
        * Message.cs: Reformat source to follow Mono source style. Ensure that
        ToString works if a Location is null (e.g. rules on assemblies and 
        modules may not have a location).
        * MessageType.cs: New file. Moved enum from Message.cs.



Modified: trunk/cecil/gendarme/framework/ChangeLog
===================================================================
--- trunk/cecil/gendarme/framework/ChangeLog    2006-11-06 23:33:03 UTC (rev 
67420)
+++ trunk/cecil/gendarme/framework/ChangeLog    2006-11-07 00:10:43 UTC (rev 
67421)
@@ -1,3 +1,12 @@
+2006-11-06  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * framework.mdp: Update to add new file.
+       * Makefile.am: Update to add new file.
+       * Message.cs: Reformat source to follow Mono source style. Ensure that
+       ToString works if a Location is null (e.g. rules on assemblies and 
+       modules may not have a location).
+       * MessageType.cs: New file. Moved enum from Message.cs.
+
 2006-10-09  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * Runner.cs: Remove Violations.Reset(); from Process as it's reset the 

Modified: trunk/cecil/gendarme/framework/Makefile.am
===================================================================
--- trunk/cecil/gendarme/framework/Makefile.am  2006-11-06 23:33:03 UTC (rev 
67420)
+++ trunk/cecil/gendarme/framework/Makefile.am  2006-11-07 00:10:43 UTC (rev 
67421)
@@ -10,7 +10,7 @@
                    RuleInformation.cs  RuleInformationManager.cs \
                    Rules.cs Runner.cs Violation.cs Violations.cs \
                    Message.cs Location.cs MinimalRunner.cs \
-                   MessageCollection.cs
+                   MessageCollection.cs MessageType.cs
 
 framework_build_sources = $(addprefix $(srcdir)/, $(framework_sources))
 framework_build_sources += $(framework_generated_sources)

Modified: trunk/cecil/gendarme/framework/Message.cs
===================================================================
--- trunk/cecil/gendarme/framework/Message.cs   2006-11-06 23:33:03 UTC (rev 
67420)
+++ trunk/cecil/gendarme/framework/Message.cs   2006-11-07 00:10:43 UTC (rev 
67421)
@@ -12,41 +12,39 @@
  * See the included LICENSE.MIT file for details.
  **********************************************************************/
 
-namespace Gendarme.Framework{
+namespace Gendarme.Framework {
 
-public class Message {
-    private string text;
-    private Location location;
-    private MessageType type;
+       public class Message {
+       
+               private string text;
+               private Location location;
+               private MessageType type;
 
-    public Message(string text, Location location, MessageType type)
-    {
-        this.text = text;
-        this.location = location;
-        this.type = type;
-    }
+               public Message (string text, Location location, MessageType 
type)
+               {
+                       this.text = text;
+                       this.location = location;
+                       this.type = type;
+               }
 
-    public string Text {
-        get { return text; }
-    }
+               public string Text {
+                       get { return text; }
+               }
 
-    public Location Location {
-        get { return location; }
-    }
+               public Location Location {
+                       get { return location; }
+               }
 
-    public MessageType Type {
-        get { return type; }
-    }
+               public MessageType Type {
+                       get { return type; }
+               }
 
-    public override string ToString()
-    {
-        return location.ToString() + ": " + text;
-    }
+               public override string ToString ()
+               {
+                       if (location != null)
+                               return location.ToString () + ": " + text;
+                       else
+                               return text;
+               }
+       }
 }
-
-public enum MessageType {
-    Error,
-    Warning
-}
-
-}

Added: trunk/cecil/gendarme/framework/MessageType.cs
===================================================================
--- trunk/cecil/gendarme/framework/MessageType.cs       2006-11-06 23:33:03 UTC 
(rev 67420)
+++ trunk/cecil/gendarme/framework/MessageType.cs       2006-11-07 00:10:43 UTC 
(rev 67421)
@@ -0,0 +1,21 @@
+/*
+ * Message.cs: an error or warning message produced by a checker when it
+ * discovers a problem.
+ *
+ * Authors:
+ *   Aaron Tomb <[EMAIL PROTECTED]>
+ *
+ * Copyright (c) 2005 Aaron Tomb and the contributors listed
+ * in the ChangeLog.
+ *
+ * This is free software, distributed under the MIT/X11 license.
+ * See the included LICENSE.MIT file for details.
+ **********************************************************************/
+
+namespace Gendarme.Framework {
+
+       public enum MessageType {
+               Error,
+               Warning
+       }
+}

Modified: trunk/cecil/gendarme/framework/framework.mdp
===================================================================
--- trunk/cecil/gendarme/framework/framework.mdp        2006-11-06 23:33:03 UTC 
(rev 67420)
+++ trunk/cecil/gendarme/framework/framework.mdp        2006-11-07 00:10:43 UTC 
(rev 67421)
@@ -28,6 +28,7 @@
     <File name="./Runner.cs" subtype="Code" buildaction="Compile" />
     <File name="./Violation.cs" subtype="Code" buildaction="Compile" />
     <File name="./Violations.cs" subtype="Code" buildaction="Compile" />
+    <File name="./MessageType.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

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

Reply via email to