I'm struggling for a pattern here. I have quite a few tasks that need to be run, but only need to be run once if they haven't been run before. Everything right now is handled by if/then, booleans and a hashtable. There are also nested children of the same effect (if/then, boolean) so their parent if/then, boolean isn't set to true until the very end.
In .NET, is there some kind of code pattern or class for this that makes it simplier/clearer/less code, or am I over-thinking it and this is exactly the way needs to be done?
P.S. feel free to add better tags to this post, I wouldn't know what to add to make it more descriptive if there is a term out there