Beispiel #1
0
 void Update()
 {
     for (int i = requests.Count - 1; i >= 0; i--)
     {
         QLRequest req = requests[i];
         req.Update();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Unregisters specified request object from the update queue.
 /// </summary>
 public void UnregisterUpdate(QLRequest request)
 {
     // Remove request
     requests.Remove(request);
     // Disable update if no more requests remaining.
     if (requests.Count == 0)
     {
         enabled = false;
     }
 }
Beispiel #3
0
        /// <summary>
        /// Registers specified request object in the update queue.
        /// </summary>
        public void RegisterUpdate(QLRequest request)
        {
            if (requests.Contains(request))
            {
                return;
            }

            // Add request and enable update.
            requests.Add(request);
            enabled = true;
        }
Beispiel #4
0
        /// <summary>
        /// Creates and returns a GraphQL request.
        /// </summary>
        public static IQLRequest Request(string url, string query, object parameters)
        {
            QLRequest request = new QLRequest(I, url, query, parameters);

            return(request);
        }