private void Timer_Elapsed(object sender, ElapsedEventArgs e) { //if (!getdatabool) //{ //getdatabool = true; var latestData = GoodweService.GetData().Result; GoodweData.Add(latestData); //PvOutputService.AddStatus(latestData); if (GoodweData.Count > 100) { GoodweData.RemoveAt(0); } //} InvokeAsync(StateHasChanged); }
protected void GetData() { var latestData = GoodweService.GetData().Result; GoodweData.Add(latestData); }