/// <summary>
        /// 获取UserId,如果Assign已经finish,那么会在ToUser后面增加_finished标志,调用此方法可以返回真正的UserId
        /// </summary>
        /// <returns></returns>
        public virtual string GetToUserId()
        {
            if (this.ToUserId == null)
            {
                return(null);
            }
            int pos = this.ToUserId.IndexOf("_finished");

            return((pos >= 0)?ToUserId.Substring(0, pos):ToUserId);
        }
        /// <summary>
        /// 撤销办理完成
        /// </summary>
        public virtual void CancelFinished()
        {
            if (!IsFinished())
            {
                throw new ApplicationException("本Assign尚未执行完成");
            }
            int pos = this.ToUserId.IndexOf("_finished");

            if (pos >= 0)
            {
                ToUserId = ToUserId.Substring(0, pos);
            }
        }
Esempio n. 3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (FromUserId != 0UL)
            {
                hash ^= FromUserId.GetHashCode();
            }
            if (ToUserId != 0UL)
            {
                hash ^= ToUserId.GetHashCode();
            }
            if (CmdMsgData.Length != 0)
            {
                hash ^= CmdMsgData.GetHashCode();
            }
            return(hash);
        }