Beispiel #1
0
        public async Task <IEnumerable <EventSelector> > ListAggregates()
        {
            var eventsSelector = new List <EventSelector>();
            var clients        = await _clientRepository.ListClients();

            var identityResources = await _identityResourceRepository.ListIdentityResources();

            var apiResources = await _apiResourceRepository.ListResources();

            eventsSelector.AddRange(clients.Select(s => new EventSelector(AggregateType.Client, s)));
            eventsSelector.AddRange(identityResources.Select(s => new EventSelector(AggregateType.IdentityResource, s)));
            eventsSelector.AddRange(apiResources.Select(s => new EventSelector(AggregateType.ApiResource, s)));

            return(eventsSelector);
        }