Exemplo n.º 1
0
 private Task <Dictionary <string, ConfigurationClient> > GetClientLookup()
 {
     return(cachingStrategy.GetOrCreateAsync(clientCache, async() =>
     {
         var clients = await clientRepo.GetClientsAsync();
         return clients.ToDictionary(k => k.ClientId, StringComparer.OrdinalIgnoreCase);
     }));
 }
Exemplo n.º 2
0
        public Task <ConfigurationSet> GetConfigurationSet(Type type, ConfigurationIdentity identity)
        {
            var key = GetKey(type, identity);

            return(cachingStrategy.GetOrCreateAsync(cachePrefix + key, () => GetConfigurationSetFromSource(type, identity)));
        }