/// <summary> /// Gets a specific exception with the specified guid /// </summary> public Error Get(Guid guid) { if (_isInRetry) { return(WriteQueue.FirstOrDefault(e => e.GUID == guid)); } try { return(GetError(guid)); } catch (Exception ex) { BeginRetry(ex); } return(null); }
public bool AbortFirstEvent <T>() where T : EventBase { var type = typeof(T); var toRemove = WriteQueue.FirstOrDefault(e => e.GetType() == type); if (toRemove == null) { return(false); } WriteQueue.Remove(toRemove); Log.Trace("Aborted {0}", type.Name); return(true); }