public void Transition(ModificationPhase phase) { lock (synchronization) { currentPhase?.HandleExit(); currentPhase = phase; currentPhase.HandleEnter(); } }