Exemple #1
0
 /// <summary>
 /// register the LogfileScanner in the CommandersLog for the DataEvent
 /// </summary>
 /// <param name="JournalScanner"></param>
 public void registerJournalScanner(FileScanner.EDJournalScanner JournalScanner)
 {
     try
     {
         if (m_JournalScanner == null)
         {
             m_JournalScanner = JournalScanner;
             m_JournalScanner.JournalEventRecieved += JournalEventRecieved;
         }
         else
         {
             throw new Exception("LogfileScanner already registered");
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error while registering the LogfileScanner", ex);
     }
 }
        /// <summary>
        /// register the LogfileScanner in the CommandersLog for the DataEvent
        /// </summary>
        /// <param name="JournalScanner"></param>
        public void registerJournalScanner(FileScanner.EDJournalScanner JournalScanner)
        {
            try
            {
                if(m_JournalScanner == null)
                { 
                    m_JournalScanner = JournalScanner;
                    m_JournalScanner.JournalEventRecieved += JournalEventRecieved;
                }
                else 
                    throw new Exception("LogfileScanner already registered");

            }
            catch (Exception ex)
            {
                throw new Exception("Error while registering the LogfileScanner", ex);
            }
        }
Exemple #3
0
 /// <summary>
 /// unregister the LogfileScanner
 /// </summary>
 /// <param name="LogfileScanner"></param>
 public void UnregisterJournalScanner()
 {
     try
     {
         if(m_JournalScanner != null)
         { 
             m_JournalScanner.JournalEventRecieved -= JournalEventRecieved;
             m_JournalScanner = null;
         }
     }
     catch (Exception ex)
     {
         throw new Exception("Error while unregistering the LogfileScanner", ex);
     }
 }