Пример #1
0
        public Task <List <ComponentWithId> > GetJson(string collectionName, string json)
        {
            TaskCompletionSource <List <ComponentWithId> > tcs = new TaskCompletionSource <List <ComponentWithId> >();

            DBQueryJsonTask dbQueryJsonTask = ComponentFactory.Create <DBQueryJsonTask, string, string, TaskCompletionSource <List <ComponentWithId> > >(collectionName, json, tcs);

            this.tasks[(int)((ulong)dbQueryJsonTask.Id % taskCount)].Add(dbQueryJsonTask);

            return(tcs.Task);
        }
Пример #2
0
 public override void Awake(DBQueryJsonTask self, string collectionName, string json, ETTaskCompletionSource <List <ComponentWithId> > tcs)
 {
     self.CollectionName = collectionName;
     self.Json           = json;
     self.Tcs            = tcs;
 }