[mono-api-html] Make it possible to hide/show non-breaking changes in the html output.
[mono.git] / mcs / tools / corcompare / mono-api-html / MethodComparer.cs
index 1dffa17dfcc512b7549127dff18e9ec6fd498a80..4c893e757ec621125fff5c82a4a9eb3fc27c93e9 100644 (file)
@@ -26,6 +26,7 @@
 
 using System;
 using System.Linq;
+using System.Reflection;
 using System.Xml.Linq;
 
 namespace Xamarin.ApiDiff {
@@ -62,5 +63,15 @@ namespace Xamarin.ApiDiff {
                                return eGPs.Count () == sGPs.Count ();
                        }
                }
+
+               protected override bool IsBreakingRemoval (XElement e)
+               {
+                       // Removing virtual methods that override another method is not a breaking change.
+                       var is_override = e.Attribute ("is-override");
+                       if (is_override != null)
+                               return is_override.Value != "true";
+                       
+                       return true; // all other removals are breaking changes
+               }
        }
 }
\ No newline at end of file