Beispiel #1
0
 protected void OnShowDebugMessage(string message)
 {
     if (this.ShowDebugMessage != null)
     {
         TExceptionEventArgs e = new TExceptionEventArgs(message);
         this.ShowDebugMessage(this, e);
     }
 }
Beispiel #2
0
        /// <summary>
        /// Session中触发的事件
        /// </summary>
        protected virtual void OnDatabaseException(Exception err)
        {
            EventHandler <TExceptionEventArgs> handler = this.DatabaseException;

            if (handler != null)
            {
                TExceptionEventArgs e = new TExceptionEventArgs(err);
                handler(this, e);
            }
        }
Beispiel #3
0
        protected virtual void OnDatabaseException(object sender, TExceptionEventArgs e)
        {
            Interlocked.Increment(ref m_databaseExceptionCount);

            EventHandler <TExceptionEventArgs> handler = this.DatabaseException;

            if (handler != null)
            {
                handler(sender, e);  // 转发事件的激发者
            }
        }
Beispiel #4
0
        protected virtual void OnServerException(Exception err)
        {
            Interlocked.Increment(ref m_serverExceptCount);

            EventHandler <TExceptionEventArgs> handler = this.ServerException;

            if (handler != null)
            {
                TExceptionEventArgs e = new TExceptionEventArgs(err);
                handler(this, e);
            }
        }