Currently I have code that looks like this
Status("Start Step 1");
result = Step1();
Status("End Step 1", result);
Status("Start Step 2");
result = Step2();
Status("End Step 2", result);
Status("Start Step 3");
result = Step3();
Status("End Step 3", result);
Would it be possible to somehow refactor this code and get rid of the status lines. — however it is very important to update the status at the start and end of each step.
I thought about moving the status lines into the Step1,2,3 calls but that just clutters up the methods.
with the obvious invocations
You can refine as needed. For example, building on the previous:
making the invocations slightly simpler and even
building on the previous. So now you can say