Author: nestor
Date: 2008-02-07 12:09:09 -0500 (Thu, 07 Feb 2008)
New Revision: 95156

Modified:
   trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/ChangeLog
   
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/EmptyDestructorRule.cs
   
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/IDisposableWithDestructorWithoutSuppressFinalizeRule.cs
Log:
2008-02-07  Nestor Salceda <[EMAIL PROTECTED]>

        * EmptyDestructorRule.cs,
        IDisposableWithDestructorWithoutSuppressFinalizeRule.cs:
        Replaced TypeDefinition.GetFinalizer with
        TypeDefinition.GetMethod for avoid some warnings when compiling.



Modified: trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/ChangeLog
===================================================================
--- trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/ChangeLog        
2008-02-07 17:01:33 UTC (rev 95155)
+++ trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/ChangeLog        
2008-02-07 17:09:09 UTC (rev 95156)
@@ -1,3 +1,10 @@
+2008-02-07  Nestor Salceda  <[EMAIL PROTECTED]>
+
+       * DisposableTypesShouldHaveFinalizerRule.cs,
+       FinalizersShouldCallBaseClassFinalizerRule.cs,
+       FinalizersShouldBeProtectedRule.cs: Replaced TypeDefinition.GetFinalizer
+       with TypeDefinition.GetMethod for avoid some warnings when compiling.
+
 2008-02-06  Sebastien Pouliot  <[EMAIL PROTECTED]>
 
        * AvoidUnsealedUninheritedInternalClassesRule.cs: New. Rule to check

Modified: 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/EmptyDestructorRule.cs
===================================================================
--- 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/EmptyDestructorRule.cs
   2008-02-07 17:01:33 UTC (rev 95155)
+++ 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/EmptyDestructorRule.cs
   2008-02-07 17:09:09 UTC (rev 95156)
@@ -41,7 +41,7 @@
                public MessageCollection CheckType (TypeDefinition type, Runner 
runner)
                {
                        // rule applies only to type with a finalizer
-                       MethodDefinition finalizer = type.GetFinalizer ();
+                       MethodDefinition finalizer = type.GetMethod 
(MethodSignatures.Finalize);
                        if (finalizer == null)
                                return runner.RuleSuccess;
 

Modified: 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/IDisposableWithDestructorWithoutSuppressFinalizeRule.cs
===================================================================
--- 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/IDisposableWithDestructorWithoutSuppressFinalizeRule.cs
  2008-02-07 17:01:33 UTC (rev 95155)
+++ 
trunk/mono-tools/gendarme/rules/Gendarme.Rules.Performance/IDisposableWithDestructorWithoutSuppressFinalizeRule.cs
  2008-02-07 17:09:09 UTC (rev 95156)
@@ -93,7 +93,7 @@
                                return runner.RuleSuccess;
 
                        // #3 - look for a destructor
-                       if (type.GetFinalizer () == null)
+                       if (type.GetMethod (MethodSignatures.Finalize) == null)
                                return runner.RuleSuccess;
 
                        // #4 - look if GC.SuppressFinalize is being called in 
the

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

Reply via email to