/// <summary> /// 检查入队成员是否有后续更新 /// </summary> /// <param name="t"></param> public bool CheckUpdateReqInQueue(RequestContent t) { if (t == null) { return(false); } _SysMutex.WaitOne(Timeout.Infinite, true); bool chkFlag = false; try { for (int i = 0; i < _QList.Count; i++) { if (_QList[i] != null && _QList[i] is RequestContent) { if (t.Equals(_QList[i] as RequestContent)) { chkFlag = true; break; } } } } catch (Exception e) { Util.Log(e.Message); Util.Log(e.StackTrace); } _SysMutex.ReleaseMutex(); return(chkFlag); }
/// <summary> /// 检查最新入队成员 /// </summary> /// <param name="t"></param> public bool CheckLastReqInQueue(RequestContent t) { if (t == null) { return(false); } _SysMutex.WaitOne(Timeout.Infinite, true); bool chkFlag = false; try { if (_QList.Count > 0 && _QList[_QList.Count - 1] != null && _QList[_QList.Count - 1] is RequestContent) { if (t.Equals(_QList[_QList.Count - 1] as RequestContent)) { chkFlag = true; } else { chkFlag = false; } } } catch (Exception e) { Util.Log(e.Message); Util.Log(e.StackTrace); } _SysMutex.ReleaseMutex(); return(chkFlag); }