Esempio n. 1
0
 private void Do(Action action)
 {
     try {
         action();
     } catch (Exception ex) {
         SystemLog.Unexcepted(ex);
     }
 }
Esempio n. 2
0
 protected override void Dispose(bool disposing)
 {
     if (_webRequest != null)
     {
         try {
             _webRequest.Abort();
         } catch (Exception ex) {
             SystemLog.Unexcepted(ex);
         }
     }
     if (_waitHandle != null)
     {
         _waitHandle.Close();
     }
 }
Esempio n. 3
0
        private bool CanLog(TracingLevel level, string from, string to, out int sniffMask)
        {
            sniffMask = 0;
            if (_sniffers != null)
            {
                try {
                    for (int i = 0; i < TracingSniffer.MaxSniffer; i++)
                    {
                        TracingSniffer sniffer = _sniffers[i];
                        if (sniffer != null)
                        {
                            if (sniffer.CanSniff(level, from, to))
                            {
                                sniffMask |= (1 << i);
                            }
                        }
                    }
                } catch (Exception ex) {
                    SystemLog.Unexcepted(ex);
                }
            }

            return((level >= TracingManager.Level) || (sniffMask > 0));
        }