[NotNull] public IScope Leave() { lock (mLock) { if (mStateStack.Count <= 0) { return(this); } if (LeaveTrigger == ScopeLeaveTrigger.Leaving) { mOnLeave?.Invoke(); } LeavingOverride(); Leaving?.Invoke(this, new EventArgs()); mStateStack.Pop(); Left?.Invoke(this, new EventArgs()); LeftOverride(); if (LeaveTrigger == ScopeLeaveTrigger.Left) { mOnLeave?.Invoke(); } return(this); } }
public override void MoveElement(Size formSize) { // Query whether the pipe is outside the playing field if (Right < 0) { Leaving?.Invoke(this); } // Move Pipe base.MoveElement(formSize); }
private void Scene_Leaving(object sender, EventArgs e) { Leaving?.Invoke(sender, e); }
public void TriggerLeaving() { Leaving?.Invoke(this, EventArgs.Empty); }