You can try this query, that lists for each type t
, all types instantiated in the code of t
(i.e a type is instantiated when one of its constructor is called through the new
operator).
from t in JustMyCode.Types
let typesInstantiated = from tUsed in t.TypesUsed
where tUsed.Constructors.Any(c => c.IsUsedBy(t))
select tUsed
where typesInstantiated.Count() > 0
select new { t, typesInstantiated }
The result looks like: