Ejemplo n.º 1
0
 public static LoggerPersistance getInstance()
 {
     lock (lockObject)
     {
         if (instance == null)
         {
             instance = new LoggerPersistance();
         }
         return(instance);
     }
 }
Ejemplo n.º 2
0
 private void logQueWork(object sender, DoWorkEventArgs e)
 {
     while (true)
     {
         Message message = queue.Receive();
         if (message != null)
         {
             string logLine = message.Body.ToString();
             LoggerPersistance.getInstance().AddLine(logLine);
         }
     }
 }