I would like to count how many times function 'ExecuteAction' appear in class method.
public class A : B
{
public void X()
{
ExecuteAction(....);
ExecuteAction(....);
}
}
And the score is 2 becouse ExecuteAction appear 2x. I need it becouse I build testing framework and would like allow for external test operator to know where current step execution is and where it will end. Is it possible to do or should I change my approach?
Thank you.
Below is the approach that demonstrates how to read method body via reflection and count all the calls of the specific method:
The
ILReader
class is implemented as follows(minimal implementation for this specific task) :Why not write a script that counts the number of times your function appears in your source code? Something along the lines of: