/// <summary> /// 刪除 /// </summary> /// <param name="collectionName"></param> /// <param name="id"></param> /// <returns></returns> public ETTask <bool> Delete(string collectionName, long id) { ETTaskCompletionSource <bool> tcs = new ETTaskCompletionSource <bool>(); CacheDeleteByIdTask cacheDeleteTask = ComponentFactory.CreateWithId <CacheDeleteByIdTask, string, ETTaskCompletionSource <bool> >(id, collectionName, tcs); this.tasks[(int)((ulong)id % taskCount)].Add(cacheDeleteTask); return(tcs.Task); }
public override void Awake(CacheDeleteByIdTask self, string collectionName, ETTaskCompletionSource <bool> tcs) { self.Tcs = tcs; self.CollectionName = collectionName; }