Exemple #1
0
 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;
 }
Exemple #2
0
        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);
        }