/// <summary> /// 更新 /// </summary> /// <param name="collectionName"></param> /// <param name="id"></param> /// <param name="jsonData"></param> /// <returns></returns> public ETTask <ComponentWithId> UpdateById(string collectionName, long id, string jsonData) { ETTaskCompletionSource <ComponentWithId> tcs = new ETTaskCompletionSource <ComponentWithId>(); CacheUpdateByIdTask cacheUpdateByIdTask = ComponentFactory.CreateWithId <CacheUpdateByIdTask, string, string, ETTaskCompletionSource <ComponentWithId> >(id, collectionName, jsonData, tcs); this.tasks[(int)((ulong)id % taskCount)].Add(cacheUpdateByIdTask); return(tcs.Task); }
public override void Awake(CacheUpdateByIdTask self, string collectionName, string dataJson, ETTaskCompletionSource <ComponentWithId> tcs) { self.CollectionName = collectionName; self.Tcs = tcs; self.DataJson = dataJson; }