public Task <List <Component> > Get2Json(string collectionName, string json) { TaskCompletionSource <List <Component> > tcs = new TaskCompletionSource <List <Component> >(); DBQuery2JsonTask dbQueryJsonTask = ComponentFactory.Create <DBQuery2JsonTask, string, string, TaskCompletionSource <List <Component> > >(collectionName, json, tcs); this.tasks[(int)((ulong)dbQueryJsonTask.Id % taskCount)].Add(dbQueryJsonTask); return(tcs.Task); }
public override void Awake(DBQuery2JsonTask self, string collectionName, string json, TaskCompletionSource <List <Component> > tcs) { self.CollectionName = collectionName; self.Json = json; self.Tcs = tcs; }