示例#1
0
 private async Task RepositoryChangeAsync(object sender, CollectionRepositoryEventArgs args)
 {
     if (args.CollectionAlias == CollectionAlias)
     {
         await InvokeAsync(async() => await UpdateNodesAsync());
     }
 }
示例#2
0
        private async Task OnRepositoryChangeAsync(object?sender, CollectionRepositoryEventArgs args)
        {
            if (args.RepositoryAlias == _setup.RepositoryAlias)
            {
                await SetElementsAsync(refreshCache : true);

                OnDataChange?.Invoke(sender, EventArgs.Empty);
            }
        }
        private Task OnRepositoryChangeAsync(object?sender, CollectionRepositoryEventArgs args)
        {
            if ((!string.IsNullOrEmpty(_repositoryAlias) && args.RepositoryAlias == _repositoryAlias) ||
                (string.IsNullOrEmpty(_repositoryAlias) && args.CollectionAlias == _collectionAlias))
            {
                OnDataChange?.Invoke(sender, EventArgs.Empty);
            }

            return(Task.CompletedTask);
        }