I tried to calculate the class coupling with ndepend. But as far as I can see, all dependencies on other classes are added (see image, so the ones from my Project: MultiCar, from mscorlib and System). I would like to only consider the types from my project and not the rest. Of course the value is given here, but I would like it to be directly calculated. Is there any why? I already tried to change the query shown at the top of the picture, but I am not familiar with it and did not find a good explanation on how to change it the way I want it to be. I really hope someone can help me.
The query is depicted in this figure.
To do so you need to edit the code query generated by the Search type by class coupling panel.
The query generated to edit manually is:
from t in Application.Types
where t.NbTypesUsed >= 0
orderby t.NbTypesUsed descending
select new {
t,
t.TypesUsed,
t.TypesUsingMe
}
You just need to edit the TypesUsed
line:
from t in Application.Types
where t.NbTypesUsed >= 0
orderby t.NbTypesUsed descending
select new {
t,
TypesUsed = t.TypesUsed.Where(tu => !tu.IsThirdParty),
t.TypesUsingMe
}
Et voilĂ :)