I pull my hair out trying to solve it. What I'm trying to do is create a “map” of how objects are used in some code I'm working on. Think of it as an advanced search. The easiest way to show this is with an example:
public class MasterClass
{
Type1 type1;
Type2 type2;
Type3 type3;
void InitializeData()
{
type1 = new Type1(this);
type2 = new Type2(this);
type3 = new Type3(this);
}
}
public class Type1
{
private MasterClass _master;
public Type1(MasterClass master)
{
_master = master;
}
public void Something()
{
}
}
public class Type2
{
private MasterClass _master;
public Type2(MasterClass master)
{
_master = master;
}
public void Something()
{
}
}
public class Type3
{
private MasterClass _master;
public Type3(MasterClass master)
{
_master = master;
}
public void Something()
{
}
}
What I'm trying to do is get a mapping or report, which in the example example will give something like:
Type1 used: {Type3}
Type2 used: {Type1, Type3}
Type3 used: {Type1, Type2}
If I can get it in the dictionary, then I'm at home. :-)
What I tried:
, , , IL, . , , , , , .
Reflector &/|| Resharper, , .
?