/// <summary> /// OnAfterRenderAsync /// </summary> /// <param name="firstRender"></param> protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { DiscovererList = await RegistryHelper.GetDiscovererListAsync(); Page = "1"; _pagedDiscovererList = DiscovererList.GetPaged(int.Parse(Page), CommonHelper.PageLengthSmall, DiscovererList.Error); CommonHelper.Spinner = string.Empty; CommonHelper.CheckErrorOrEmpty(_pagedDiscovererList, ref _tableView, ref _tableEmpty); StateHasChanged(); _discovererEvent = await RegistryServiceEvents.SubscribeDiscovererEventsAsync( ev => InvokeAsync(() => DiscovererEvent(ev))); } }
protected override async Task SubscribeEvents() { _events = await RegistryServiceEvents.SubscribeDiscovererEventsAsync( ev => InvokeAsync(() => DiscovererEvent(ev))); }