/// <summary>
 /// 覆盖 Equals 方法.
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public override bool Equals(object obj)
 {
     if (obj is NewWorkNumberRespond)
     {
         NewWorkNumberRespond oMessageBody = obj as NewWorkNumberRespond;
         return(oMessageBody.ResultWorkNumber == this.ResultWorkNumber &&
                oMessageBody.TopWorkNumber == this.TopWorkNumber &&
                oMessageBody.QueueLength == this.QueueLength);
     }
     return(false);
 }
 /// <summary>
 /// 获取 申请新号码的 反馈消息.
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 private NewWorkNumberRespond GetNewWorkNumberRespond(NewWorkNumberRequest request)
 {
     NewWorkNumberRespond result = new NewWorkNumberRespond()
     {
         // 请求号码
         ResultWorkNumber = queueManager.GetNewWorkNumber(request.ServiceCode),
         // 队列首号码.
         TopWorkNumber = queueManager.GetTopWorkNumber(request.ServiceCode),
         // 队列长度.
         QueueLength = queueManager.GetWorkNumberCount(request.ServiceCode),
     };
     return result;
 }