/// <summary>
        /// 用複合唯一索引刪除
        /// </summary>
        /// <param name="collectionName"></param>
        /// <param name="uniqueName"></param>
        /// <param name="json"></param>
        /// <returns></returns>
        public ETTask <bool> DeleteByUnique(string collectionName, string uniqueName, string json)
        {
            ETTaskCompletionSource <bool> tcs = new ETTaskCompletionSource <bool>();
            CacheDeleteByUniqueTask       cacheDeleteByUniqueTask = ComponentFactory.Create <CacheDeleteByUniqueTask, string, ETTaskCompletionSource <bool> >(collectionName, tcs);

            cacheDeleteByUniqueTask.UniqueName = uniqueName;
            cacheDeleteByUniqueTask.Json       = json;
            this.tasks[(int)((ulong)cacheDeleteByUniqueTask.Id % taskCount)].Add(cacheDeleteByUniqueTask);

            return(tcs.Task);
        }
예제 #2
0
 public override void Awake(CacheDeleteByUniqueTask self, string collectionName, ETTaskCompletionSource <bool> tcs)
 {
     self.Tcs            = tcs;
     self.CollectionName = collectionName;
 }