/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public void Dispose() { lock (this) { if (!Disposed) { Disposed = true; GC.SuppressFinalize(this); ExceptionManagerContainer?.Dispose(); } } }
/// <summary> /// Sends the exception. /// </summary> /// <param name="ex">The ex.</param> /// <param name="bIgnoreTracker">if set to <c>true</c> [b ignore tracker].</param> public override void SendException(Exception ex, bool bIgnoreTracker = false) { var eventTracker = new TimeSpan(0, WorkManagerConfig.EventTracker, 0); if (bIgnoreTracker || TimeEventTracker.CanEvent((int)StringHash.BKDRHash(ex.Message), eventTracker)) { // add additional information to the Exception Info. var additionalInfo = new NameValueCollection(); additionalInfo.Add("Timestamp", DateTimeOffset.Now.ToString()); additionalInfo.Add("Application Source", WorkManagerConfig.ApplicationName); ExceptionManagerContainer.Publish(ex, additionalInfo); } }