Beispiel #1
0
 /// <summary>
 /// Throws the assertion.
 /// </summary>
 /// <param name="assertion">the result of condition of assertion</param>
 /// <param name="category">The category.</param>
 /// <param name="newMessage">The  message.</param>
 public void ThrowAssertion(bool assertion, short category, string newMessage)
 {
     if (!assertion)
     {
         m_EventLog.SetCategory = category;
         this.m_Category        = category;
         m_EventLog.SetMessage  = newMessage;
         m_EventLog.WriteEntry();
         throw this;
     }
 }
Beispiel #2
0
 private void DecCounter()
 {
     lock (this)
     {
         if (m_InternalCounter < +0)
         {
             return;
         }
         m_InternalCounter--;
         if (m_InternalCounter == 0)
         {
             string _exceptionMessage = myEventLog.GetMessage + " process:" + Name;
             myEventLog.SetMessage = _exceptionMessage;
             myEventLog.WriteEntry();
             m_Thread.Abort();
         }
     }
 }