Help naming a class that has a single public method called Execute()

Posted by devoured elysium on Stack Overflow See other posts from Stack Overflow or by devoured elysium
Published on 2010-04-26T02:13:36Z Indexed on 2010/04/26 2:23 UTC
Read the original article Hit count: 251

I have designed the following class that should work kind of like a method (usually the user will just run Execute()):

public abstract class ??? {
    protected bool hasFailed = false;
    protected bool hasRun = false;

    public bool HasFailed { get { return hasFailed; } }
    public bool HasRun { get { return hasRun; } }

    private void Restart() {
        hasFailed = false;
        hasRun = false;
    }

    public bool Execute() {
        ExecuteImplementation();
        bool returnValue = hasFailed;
        Restart();
        return returnValue;
    }

    protected abstract void ExecuteImplementation();        
}

My question is: how should I name this class? Runnable? Method(sounds awkward)?

© Stack Overflow or respective owner

Related posts about c#

Related posts about java