I am writing an application which performs a series of steps in the order specified:
1. Read a file (xml)
2. Create Directory
3. Create files in that directory
4. Some other step
5. Some more steps
If any step fails none of the remaining steps are performed.
All the steps listed will be methods of a Perform class which will be instantiated in the Main method.
A straightforward way to do this is make all the methods in the Perform class as bool and check their return value in a if loop like so:
// And so on ...
This loop will grow when more steps are added.
Can someone suggest/guide in implementing this in any other way?