/// <summary> /// OnAfterRenderAsync /// </summary> /// <param name="firstRender"></param> protected override async Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { GatewayList = await RegistryHelper.GetGatewayListAsync(); Page = "1"; _pagedGatewayList = GatewayList.GetPaged(int.Parse(Page), CommonHelper.PageLength, GatewayList.Error); CommonHelper.Spinner = string.Empty; CommonHelper.CheckErrorOrEmpty(_pagedGatewayList, ref _tableView, ref _tableEmpty); StateHasChanged(); _gatewayEvent = await RegistryServiceEvents.SubscribeGatewayEventsAsync( ev => InvokeAsync(() => GatewayEvent(ev))); } }
protected override async Task SubscribeEvents() { _events = await RegistryServiceEvents.SubscribeGatewayEventsAsync( ev => InvokeAsync(() => GatewayEvent(ev))); }