Exemple #1
0
 private void CheckForNewLogEntries(object state)
 {
     if (Monitor.TryEnter(LockObject))
     {
         try
         {
             Logger.Write(new LogEntry {
                 Message    = "Checking for new entries",
                 Categories = { "Plugin." + GetType().Name }
             });
             CheckForNewLogEntriesImpl();
         }
         catch (Exception ex)
         {
             var args = new PluginExceptionEventArgs {
                 Exception = ex
             };
             if (PluginException != null)
             {
                 PluginException(this, args);
             }
         }
         finally
         {
             Monitor.Exit(LockObject);
         }
     }
 }
Exemple #2
0
 protected void OnLogProviderException(PluginExceptionEventArgs e)
 {
     if (PluginException != null)
     {
         PluginException(this, e);
     }
 }
Exemple #3
0
 private void CheckForNewLogEntries(object state)
 {
     if (Monitor.TryEnter(LockObject))
     {
         try
         {
             Logger.Write(new LogEntry { Message = "Checking for new entries",
                 Categories = { "Plugin." + GetType().Name } });
             CheckForNewLogEntriesImpl();
         }
         catch (Exception ex)
         {
             var args = new PluginExceptionEventArgs { Exception = ex };
             if (PluginException != null)
                 PluginException(this, args);
         }
         finally
         {
             Monitor.Exit(LockObject);
         }
     }
 }
Exemple #4
0
 protected void OnLogProviderException(PluginExceptionEventArgs e)
 {
     if (PluginException != null)
         PluginException(this, e);
 }
 static void LogProviderLogProviderException(object sender, PluginExceptionEventArgs args)
 {
     var logEntry =
         new Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry
             {
                 Severity = TraceEventType.Error,
                 Message = args.Exception.ToString()
             };
     Logger.Write(logEntry);
 }