Instantly share code, notes, and snippets.

anonymous /gist:10991092
Created Apr 17, 2014

What would you like to do?
// <Name>Base class should not use derivatives</Name>
warnif count > 0
from baseClass in JustMyCode.Types
where baseClass.IsClass
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