private void Do(Action action) { try { action(); } catch (Exception ex) { SystemLog.Unexcepted(ex); } }
protected override void Dispose(bool disposing) { if (_webRequest != null) { try { _webRequest.Abort(); } catch (Exception ex) { SystemLog.Unexcepted(ex); } } if (_waitHandle != null) { _waitHandle.Close(); } }
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)); }