Beispiel #1
0
        private async Task GetDetailsRest()
        {
            var sw = new Stopwatch();

            sw.Start();
            _restDetails = await Http.GetFromJsonAsync <TweeterDetails>($"api/tweeterRest/details/{_restRequest}");

            sw.Stop();
            Console.WriteLine($"Rest tweet Details took {sw.ElapsedMilliseconds}ms");
            _restDeetsTime = $" {sw.ElapsedMilliseconds}ms";
            restBusy       = false;
            await InvokeAsync(StateHasChanged);
        }
Beispiel #2
0
        public TweeterService()
        {
            var detailsJson = ResultFromJsonFile();

            _tweeterDetails = JsonSerializer.Deserialize <TweeterDetails>(detailsJson);
        }