public override void Awake(DBQueryPaginationQuery self, string collectionName, string page, ETTaskCompletionSource <List <ComponentWithId> > tcs) { self.CollectionName = collectionName; self.page = int.Parse(page.Split('|')[0]); self.dbsize = int.Parse(page.Split('|')[1]); self.Tcs = tcs; }
public ETTask <List <ComponentWithId> > GetPagination(string collectionName, string page) { ETTaskCompletionSource <List <ComponentWithId> > tcs = new ETTaskCompletionSource <List <ComponentWithId> >(); DBQueryPaginationQuery dBQueryPaginationTask = ComponentFactory.Create <DBQueryPaginationQuery, string, string, ETTaskCompletionSource <List <ComponentWithId> > >(collectionName, page, tcs); this.tasks[(int)((ulong)dBQueryPaginationTask.Id % taskCount)].Add(dBQueryPaginationTask); return(tcs.Task); }