Merge pull request #1406 from BrzVlad/monitor-resurrect
[mono.git] / mcs / tools / corcompare / mono-api-html / NamespaceComparer.cs
index 7239385870eba9811c0caa90dafb70fa574b439e..427df66e6eb9cef2350288359f7226862dfe28ea 100644 (file)
@@ -26,6 +26,7 @@
 
 using System;
 using System.IO;
+using System.Linq;
 using System.Xml.Linq;
 
 namespace Xamarin.ApiDiff {
@@ -55,7 +56,11 @@ namespace Xamarin.ApiDiff {
 
                public override void Added (XElement target)
                {
-                       Output.WriteLine ("<h2>New Namespace {0}</h2>", target.Attribute ("name").Value);
+                       string name = target.Attribute ("name").Value;
+                       if (State.IgnoreNew.Any (re => re.IsMatch (name)))
+                               return;
+
+                       Output.WriteLine ("<h2>New Namespace {0}</h2>", name);
                        Output.WriteLine ();
                        // list all new types
                        foreach (var addedType in target.Element ("classes").Elements ("class"))