Exemple #1
0
 protected override async Task SubscribeEvents()
 {
     _events = await RegistryServiceEvents.SubscribeApplicationEventsAsync(
         async data => {
         await InvokeAsync(() => ApplicationEvent(data));
     });
 }
Exemple #2
0
        /// <summary>
        /// OnAfterRenderAsync
        /// </summary>
        /// <param name="firstRender"></param>
        protected override async Task OnAfterRenderAsync(bool firstRender)
        {
            if (firstRender)
            {
                await UpdateApplicationAsync();

                StateHasChanged();

                _applicationEvent = await RegistryServiceEvents.SubscribeApplicationEventsAsync(
                    async data => {
                    await InvokeAsync(() => ApplicationEvent(data));
                });
            }
        }