예제 #1
0
 /// <summary>
 /// unregister the LogfileScanner
 /// </summary>
 /// <param name="LogfileScanner"></param>
 public void unregisterExternalTool()
 {
     try
     {
         if(m_DataEventObject != null)
         { 
             m_DataEventObject.ExternalDataEvent -= m_ExternalDataInterface_ExternalDataEvent;
             m_DataEventObject = null;
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error while unregistering the ExternalDataTool", ex);
     }
 }
예제 #2
0
        /// <summary>
        /// register the external tool in the CommandersLog for the DataEvent
        /// </summary>
        /// <param name="LogfileScanner"></param>
        public void registerExternalTool(IBE.IBECompanion.DataEventBase ExternalDataInterface)
        {
            try
            {
                if(m_DataEventObject == null)
                { 
                    m_DataEventObject                    = ExternalDataInterface;
                    m_DataEventObject.ExternalDataEvent += m_ExternalDataInterface_ExternalDataEvent;
                }
                else 
                    throw new Exception("LogfileScanner already registered");

            }
            catch (Exception ex)
            {
                throw new Exception("Error while registering the LogfileScanner", ex);
            }
        }