public static bool isRunning(Service self) { lock (m_lock) { State state = (State)byService[self]; return state != null && state.running; } }