Types directly using one or several types changed

Code Query Code Diff Summary

Runs only in diff mode (baseline defined). Lists unchanged types directly using types whose code changed since the baseline: their code didn't change but their behavior might have. The result includes the changed types used.

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>Types directly using one or several types changed</Name>
let typesChanged = Application.Types.Where(t => t.CodeWasChanged()).ToHashSetEx()

from t in JustMyCode.Types.UsingAny(typesChanged) where
  !t.CodeWasChanged() && 
  !t.WasAdded()
let typesChangedUsed = t.TypesUsed.Intersect(typesChanged) 
select new { t, typesChangedUsed }

//<Desc>
// Runs only in *diff mode* (baseline defined). Lists *unchanged* types
// directly using *types* whose code changed since the *baseline*: their
// code didn't change but their behavior might have. The result includes the
// changed types used.
//</Desc>

Code Diff Summary: all 25 items