/// <summary> 添加一个待执行的Action /// </summary> /// <param name="item"></param> public void Add(AsynLoadingAction item) { lock (lockObj) { if (appendActions.Exists(a => a.Equals(item)) || doingActions.Exists(a => a.Equals(item))) { return; } this.appendActions.Add(item); } }
/// <summary> 是否存在一样的动作 /// </summary> /// <param name="asynLoadingAction"></param> /// <returns></returns> public bool Equals(AsynLoadingAction asynLoadingAction) { return(this.loadingAction == asynLoadingAction.loadingAction && this.callback == asynLoadingAction.callback); }