/// <summary> /// 添加操作 /// </summary> /// <param name="mOperator"></param> /// <param name="mAsynType"></param> public void AddOperator(AsynOperator mOperator, AsynType mAsynType = AsynType.AT_NoOrder) { mOperator.AsynType = mAsynType; if (mOperator.AsynType < AsynType.AT_NoOrder || mOperator.AsynType >= AsynType.AT_Max) return; this.mAsynQueue[(int)mOperator.AsynType].AddOpeator(mOperator); }
/// <summary> /// 添加操作 /// </summary> /// <param name="mOperator"></param> /// <param name="mAsynType"></param> public void AddOperator(AsynOperator mOperator, AsynType mAsynType = AsynType.AT_NoOrder) { mOperator.AsynType = mAsynType; if (mOperator.AsynType < AsynType.AT_NoOrder || mOperator.AsynType >= AsynType.AT_Max) { return; } this.mAsynQueue[(int)mOperator.AsynType].AddOpeator(mOperator); }
/// <summary> /// 初始化 /// </summary> public void Init() { // 初始化所有队列 for (AsynType mType = AsynType.AT_NoOrder; mType < AsynType.AT_Max; ++mType) { this.mAsynQueue.Add(new AsynQueue(mType)); } this.mNoOrderQueue.Add(AsynType.AT_NoOrder); }
/// <summary> /// 构造函数 /// </summary> /// <param name="mType"></param> public AsynQueue(AsynType mType) { this.mAsynType = mType; }
/// <summary> /// 是否是不是队列的操作类型 /// </summary> /// <param name="mType"></param> /// <returns></returns> protected bool IsNoOrderQueue(AsynType mType) { return(this.mNoOrderQueue.Contains(mType)); }
/// <summary> /// 是否是不是队列的操作类型 /// </summary> /// <param name="mType"></param> /// <returns></returns> protected bool IsNoOrderQueue(AsynType mType) { return this.mNoOrderQueue.Contains(mType); }