public ETTask <bool> Delete <T>(long id) where T : ComponentWithId
        {
            var       type  = typeof(T);
            CacheBase cache = null;

            caches.TryGetValue(type, out cache);
            ETTaskCompletionSource <bool> tcs  = new ETTaskCompletionSource <bool>();
            CacheDeleteTask <T>           task = ComponentFactory.CreateWithId <CacheDeleteTask <T>, CacheBase, ETTaskCompletionSource <bool> >
                                                     (id, cache, tcs);

            this.tasks[(int)((ulong)task.Id % taskCount)].Add(task);
            return(tcs.Task);
        }
Esempio n. 2
0
 public override void Awake(CacheDeleteTask <ComponentWithId> self, CacheBase proxy, ETTaskCompletionSource <bool> tcs)
 {
     self.proxy = proxy;
     self.Tcs   = tcs;
 }