protected bool?ReqCheck() { if (!isWaiting) { BeginReq(); SendReq(); return(null); } else { bool?res = ConditionReq.GetResult(reqId); if (res != null) { EndReq(); } return(res); } }
protected void BeginReq() { //if (reqId != 0) reqId = ++maxReqId; ConditionReq.AddReq(reqId); }
protected void EndReq() { ConditionReq.RemoveReq(reqId); reqId = 0; }