private IEnumerator LoadHealtCareJobsLimits() { UnityWebRequest www = UnityWebRequest.Get("http://18.223.239.177/hello/gethealthcare/" + DB.GameCode); yield return(www.SendWebRequest()); if (www.isNetworkError || www.isHttpError) { Debug.Log(www.error); } else { JsonData = www.downloadHandler.text; healthcare = JsonUtility.FromJson <Healthcare>(JsonData); { int max = -1; if (healthcare.physiotherapist > max) { max = healthcare.physiotherapist; } if (healthcare.seniorphysiotherapist > max) { max = healthcare.seniorphysiotherapist; } if (healthcare.clinical.principalphysiotherapist > max) { max = healthcare.clinical.principalphysiotherapist; } if (healthcare.clinical.serniorphysiotherapist > max) { max = healthcare.clinical.serniorphysiotherapist; } if (healthcare.educator.principalphysiotherapist > max) { max = healthcare.educator.principalphysiotherapist; } if (healthcare.educator.serniorphysiotherapist > max) { max = healthcare.educator.serniorphysiotherapist; } if (healthcare.researcher.principalphysiotherapist > max) { max = healthcare.researcher.principalphysiotherapist; } if (healthcare.researcher.serniorphysiotherapist > max) { max = healthcare.researcher.serniorphysiotherapist; } healthcare.total_upper = max; // sending data here... StartCoroutine(SendHealtCareJobsLimits()); } } }
private TimeSpan GetPollingInterval(Healthcare.ImageAvailability imageAvailability) { switch (imageAvailability) { case Healthcare.ImageAvailability.N: return TimeSpan.FromSeconds(_settings.PollingIntervalForIndeterminate); case Healthcare.ImageAvailability.Z: return TimeSpan.FromSeconds(_settings.PollingIntervalForZero); case Healthcare.ImageAvailability.P: return TimeSpan.FromSeconds(_settings.PollingIntervalForPartial); case Healthcare.ImageAvailability.C: return TimeSpan.FromSeconds(_settings.PollingIntervalForComplete); default: // ImageAvailability.X should never get pass into this method throw new NotImplementedException(); } }