Example #1
0
 /// <summary>
 ///   Registers the given function to be run when the bot receives an error message from the server.
 /// </summary>
 /// <param name = "handler">
 ///   The function to register.
 /// </param>
 public void RegisterOnErrorHook(ErrorMessageEventHandler handler)
 {
     AlarisBase.Instance.Connection.Listener.OnError += handler;
 }
 protected virtual void OnErrorMessageEventHandler(ErrorMessageEventArgs e)
 {
     ErrorMessageEventHandler?.Invoke(this, e);
 }
Example #3
0
 public ErrorMessageEventNotifier(ErrorMessageEventHandler eventHandler)
 {
     this._eventHandler = eventHandler;
 }