I think that something similar to this should do (not tested):
public void ExecuteStepAndRetryIfFailed(params Func<bool>[] allSteps)
{
foreach (var step in allSteps)
{
while (!step()) { }
}
}
But you would have to have a mean to ensure it won't loop indefinitly if a step always fail. For example, you might execute a step up to 3 times and if it still fails, abort any remainding step.