Created
May 24, 2012 14:37
-
-
Save anonymous/2781941 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <Name>Base class should not use derivatives</Name> | |
warnif count > 0 | |
from baseClass in JustMyCode.Types | |
where baseClass.IsClass && baseClass.NbChildren > 0 // <-- for optimization! | |
let derivedClassesUsed = baseClass.DerivedTypes.UsedBy(baseClass) | |
where derivedClassesUsed.Count() > 0 | |
select new { baseClass, derivedClassesUsed } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment