void Update() { for (int i = requests.Count - 1; i >= 0; i--) { QLRequest req = requests[i]; req.Update(); } }
/// <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; } }
/// <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; }
/// <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); }