Exemplo n.º 1
0
 /// <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);
     }
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 /// <summary> Instantiates a VESQLHandlers object adding 'handler' to the handlers stack </summary>
 /// <param name="handler"></param>
 public VESQLHandlers(VEBooleanDelegateIntString handler) : base(handler)
 {
 }