API: New publicly visible types
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>
Open in the interactive Rules Explorer · All default rules
API Breaking Changes: all 9 items
- API Breaking Changes: Types ND1500
- API Breaking Changes: Methods ND1501
- API Breaking Changes: Fields ND1502
- API Breaking Changes: Interfaces and Abstract Classes ND1503
- Broken serializable types ND1504
- Avoid changing enumerations Flags status ND1505
- API: New publicly visible types
- API: New publicly visible methods
- API: New publicly visible fields