Exemplo n.º 1
0
        /// <summary>
        /// OnAfterRenderAsync
        /// </summary>
        /// <param name="firstRender"></param>
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            if (firstRender)
            {
                NodeList = await PublisherHelper.PublishedAsync(EndpointId);

                Page                 = "1";
                PagedNodeList        = NodeList.GetPaged(int.Parse(Page), CommonHelper.PageLength, NodeList.Error);
                CommonHelper.Spinner = string.Empty;
                CommonHelper.CheckErrorOrEmpty(PagedNodeList, ref _tableView, ref _tableEmpty);
                StateHasChanged();
            }
        }
 /// <summary>
 /// Notify page change
 /// </summary>
 /// <param name="page"></param>
 public async Task PagerPageChangedAsync(int page)
 {
     CommonHelper.Spinner = "loader-big";
     StateHasChanged();
     if (!string.IsNullOrEmpty(NodeList.ContinuationToken) && page > PagedNodeList.PageCount)
     {
         NodeList = await PublisherHelper.PublishedAsync(EndpointId, true);
     }
     PagedNodeList = NodeList.GetPaged(page, CommonHelper.PageLength, null);
     NavigationManager.NavigateTo(NavigationManager.BaseUri + "PublishedNodes/" + page + "/" + EndpointId);
     CommonHelper.Spinner = string.Empty;
     StateHasChanged();
 }
        /// <summary>
        /// OnAfterRenderAsync
        /// </summary>
        /// <param name="firstRender"></param>
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            if (firstRender)
            {
                NodeList = await PublisherHelper.PublishedAsync(EndpointId, true);

                Page                 = "1";
                PagedNodeList        = NodeList.GetPaged(int.Parse(Page), CommonHelper.PageLength, NodeList.Error);
                CommonHelper.Spinner = string.Empty;
                CommonHelper.CheckErrorOrEmpty(PagedNodeList, ref _tableView, ref _tableEmpty);
                StateHasChanged();
                PublishEvent = await PublisherServiceEvents.NodePublishSubscribeByEndpointAsync(EndpointId,
                                                                                                samples => InvokeAsync(() => GetPublishedNodeData(samples)));
            }
        }
Exemplo n.º 4
0
 protected override async Task GetItems(bool getNextPage)
 {
     Items = await PublisherHelper.PublishedAsync(EndpointId, true);
 }