/// <summary> /// OnAfterRenderAsync /// </summary> /// <param name="firstRender"></param> protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { EndpointList = await RegistryHelper.GetEndpointListAsync(DiscovererId, ApplicationId, SupervisorId); Page = "1"; PagedendpointList = EndpointList.GetPaged(int.Parse(Page), CommonHelper.PageLength, EndpointList.Error); CommonHelper.Spinner = string.Empty; CommonHelper.CheckErrorOrEmpty(PagedendpointList, ref _tableView, ref _tableEmpty); StateHasChanged(); _endpointEvents = await RegistryServiceEvents.SubscribeEndpointEventsAsync( ev => InvokeAsync(() => EndpointEvent(ev))); } }
protected override async Task SubscribeEvents() { _events = await RegistryServiceEvents.SubscribeEndpointEventsAsync( ev => InvokeAsync(() => EndpointEvent(ev))); }