예제 #1
0
        protected virtual void DispatchMessages(bool ignoreNonFatalMessages)
        {
            SmiEventSink_Default default2 = (SmiEventSink_Default)this._parent;

            if (default2 != null)
            {
                default2.DispatchMessages(ignoreNonFatalMessages);
            }
            else
            {
                SqlException exception = this.ProcessMessages(true, ignoreNonFatalMessages);
                if (exception != null)
                {
                    throw exception;
                }
            }
        }
예제 #2
0
        protected virtual void DispatchMessages(bool ignoreNonFatalMessages)
        {
            // virtual because we want a default implementation in the cases
            // where we don't have a connection to process stuff, but we want to
            // provide the connection the ability to fire info messages when it
            // hooks up.
            SmiEventSink_Default parent = (SmiEventSink_Default)_parent;

            if (null != parent)
            {
                parent.DispatchMessages(ignoreNonFatalMessages);
            }
            else
            {
                SqlException errors = ProcessMessages(true, ignoreNonFatalMessages);   // ignore warnings, because there's no place to send them...
                if (null != errors)
                {
                    throw errors;
                }
            }
        }