Exemplo n.º 1
0
 public override void Awake(DBSortQueryJsonTask self, string[] strs, int count, TaskCompletionSource <List <ComponentWithId> > tcs)
 {
     self.CollectionName = strs[0];
     self.QueryJson      = strs[1];
     self.SortJson       = strs[2];
     self.Count          = count;
     self.Tcs            = tcs;
 }
Exemplo n.º 2
0
        public Task <List <ComponentWithId> > GetJson(string[] strs, int count)
        {
            TaskCompletionSource <List <ComponentWithId> > tcs = new TaskCompletionSource <List <ComponentWithId> >();

            DBSortQueryJsonTask dbSortQueryJsonTask = ComponentFactory.Create <DBSortQueryJsonTask, string[], int, TaskCompletionSource <List <ComponentWithId> > >(strs, count, tcs);

            this.tasks[(int)((ulong)dbSortQueryJsonTask.Id % taskCount)].Add(dbSortQueryJsonTask);
            return(tcs.Task);
        }