/// <summary>
 /// 覆盖 Equals 方法.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     if (obj is AskWorkNumberRespond)
     {
         AskWorkNumberRespond oMessageBody = obj as AskWorkNumberRespond;
         return(oMessageBody.ResultStatus == this.ResultStatus &&
                oMessageBody.ResultWorkNumber == this.ResultWorkNumber);
     }
     return(false);
 }
        /// <summary>
        /// 获取  叫号请求的 反馈消息.
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        private AskWorkNumberRespond GetAskWorkNumberRespond(AskWorkNumberRequest request)
        {
            AskWorkNumberRespond result = new AskWorkNumberRespond();

            // 取得队列长度.
            int queueCount = queueManager.GetWorkNumberCount(request.ServiceCode);

            if (queueCount == 0)
            {
                // 不存在消息.
                result.ResultStatus = AskWorkNumberRespond.ResultIsWithoutAnyWorkNumber;
                result.ResultWorkNumber = String.Empty;
            }
            else
            {
                // 存在消息.
                result.ResultStatus = AskWorkNumberRespond.ResultIsHadWorkNumber;
                result.ResultWorkNumber = queueManager.GetAskWorkNumber(request.ServiceCode);
            }

            return result;
        }