コード例 #1
0
        /// <summary>
        /// 取得該集合全部的主鍵
        /// </summary>
        /// <param name="collectionName"></param>
        /// <returns></returns>
        public ETTask <List <long> > GetAllIds(string collectionName)
        {
            ETTaskCompletionSource <List <long> > tcs = new ETTaskCompletionSource <List <long> >();
            CacheGetAllIdsTask cacheGetAllIdsTask     = ComponentFactory.Create <CacheGetAllIdsTask, string, ETTaskCompletionSource <List <long> > >(collectionName, tcs);

            this.tasks[(int)((ulong)cacheGetAllIdsTask.Id % taskCount)].Add(cacheGetAllIdsTask);

            return(tcs.Task);
        }
コード例 #2
0
 public override void Awake(CacheGetAllIdsTask self, string collectionName, ETTaskCompletionSource <List <long> > tcs)
 {
     self.Tcs            = tcs;
     self.CollectionName = collectionName;
 }