示例#1
0
        public async Task <List <MicroService> > GetAsync([NotNull] string service, CancellationToken cancellationToken = default)
        {
            Check.NotNullOrWhiteSpace(service, nameof(service));
            var key      = GetCacheKey();
            var services = await ServiceCache.GetAsync(key, token : cancellationToken);

            if (services == null)
            {
                await Poll();
            }

            services = await ServiceCache.GetAsync(key);

            return(services);
        }