Beispiel #1
0
        private async Task EnsureDiagnostics()
        {
            if (_diagCache == null)
            {
                var resp = await _client.GetDiagnostics();

                if (!resp.IsSuccessStatusCode)
                {
                    Trace.Error("HTTP Error when retrieving diagnostics: " + ((int)resp.StatusCode).ToString());
                    _diagCache = new JObject();
                }
                else
                {
                    _diagCache = await resp.ReadContent();
                }
            }
        }