API: New publicly visible types

Code Query API Breaking Changes

Runs only in diff mode (baseline defined). Lists types new in the public surface of the analyzed assemblies.

CQLinq source

This code query is written in CQLinq, C# LINQ over the NDepend code model. It ships with every new NDepend project: you can read it, adapt it, or use it as a starting point for your own custom rules.

// <Name>API: New publicly visible types</Name>
from t in Application.Types
where t.IsPubliclyVisible && 

     // The type has been removed and its parent assembly hasn't been removed …
     ( (t.WasAdded() && !t.ParentAssembly.WasAdded()) ||

     // … or the type existed but was not publicly visible
       !t.WasAdded() && !t.OlderVersion().IsPubliclyVisible)

select new { 
   t,
   OldVisibility = 
      (t.WasAdded() ? " " : 
       t.OlderVersion().Visibility.ToString()),
}

//<Desc>
// Runs only in *diff mode* (baseline defined). Lists types new in the
// public surface of the analyzed assemblies.
//</Desc>

API Breaking Changes: all 9 items