Reflector is returning the same node for two similar statements in different places. Consider the following code:
private void CreateRunners(int count)
{
runners = new ArrayList();
for (int index = 0; index < count; index++)
{
runners.Add("1");
}
assemblies = new HashSet<MultipleTestDomainRunner>();
for (int index = 0; index < count; index++)
{
assemblies.Add(new MultipleTestDomainRunner());
}
}
Reflector makes the same IStatement node for the part "int index=0" as they are textually same. The problem with that is, when a graph is built from this code sample, the graph gives additional edge from second for loop to the first loop, which is not expected.
Can anyone suggest any workaround to prevent reflector making the same IStatement node. I cannot modify the code to have two different variables for "index" in these different places.
private void CreateRunners(int count)
{
runners = new ArrayList();
for (int index = 0; index < count; index++)
{
runners.Add("1");
}
assemblies = new HashSet<MultipleTestDomainRunner>();
for (int index = 0; index < count; index++)
{
assemblies.Add(new MultipleTestDomainRunner());
}
}
Reflector makes the same IStatement node for the part "int index=0" as they are textually same. The problem with that is, when a graph is built from this code sample, the graph gives additional edge from second for loop to the first loop, which is not expected.
Can anyone suggest any workaround to prevent reflector making the same IStatement node. I cannot modify the code to have two different variables for "index" in these different places.