/// <summary> Removes 'handler' from the stack as long it is not the internal handler </summary> /// <param name="handler"></param> public void Remove(VEBooleanDelegateIntString handler) { if (handler != sqlHandler.Handler) { base.Remove(handler); } }
/// <summary> Passes 'code' and 'message' to each stacked handler delegate. /// <para> Returns true when the first of them handles the error, false if none did </para> /// </summary> /// <param name="code"></param> /// <param name="message"></param> /// <returns></returns> public bool Handle(int code, string message) { bool handled = false; for (VEBooleanDelegateIntString handler = Last; handler != null; handler = Previous) { if (handled = !handler(code, message)) { break; } } return(handled); }
/// <summary> Instantiates a VESQLHandlers object adding 'handler' to the handlers stack </summary> /// <param name="handler"></param> public VESQLHandlers(VEBooleanDelegateIntString handler) : base(handler) { }