bool ChangeState(ServiceProtocol serviceProtocol, Int64 requestID, BaseProtocol.RunStates runState) { if (true) // Decide whether to allow runstate change { // We're going to do it. // Change the runstate. // Raise event(s). serviceProtocol.DoStateChanged(requestID, runState); return(true); } else { // We're not going to do it. return(false); } }
bool ChangeState(ServiceProtocol serviceProtocol, Int64 requestID, BaseProtocol.RunStates runState) { if (true) // Decide whether to allow runstate change { // We're going to do it. // Change the runstate. // Raise event(s). serviceProtocol.DoStateChanged(requestID, runState); return true; } else { // We're not going to do it. return false; } }