protected void OnQuitApp() { // ... do something ... // can only be invoked in this class QuitEventHandler?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Registers the given function to be run when somebody quits the IRC server. /// </summary> /// <param name = "handler"> /// The function to register. /// </param> public void RegisterOnQuitHook(QuitEventHandler handler) { AlarisBase.Instance.Connection.Listener.OnQuit += handler; }
public void OnQuit() { QuitEventHandler?.Invoke(this, EventArgs.Empty); }