コード例 #1
0
 public GoogleStorageTzdbRepository(
     IApplicationLifetime lifetime,
     ILoggerFactory loggerFactory,
     GoogleCredential credential)
 {
     client = StorageClient.Create(credential);
     cache  = new TimerCache <CacheEntry>(lifetime, CacheRefreshTime, FetchReleases, loggerFactory, CacheEntry.Empty);
     cache.Start();
 }
コード例 #2
0
        public GoogleStorageBenchmarkRepository(
            IApplicationLifetime lifetime,
            ILoggerFactory loggerFactory,
            GoogleCredential credential)
        {
            StorageClient client = StorageClient.Create(credential);

            cache = new TimerCache <CacheValue>(lifetime, CacheRefreshTime, () => CacheValue.Refresh(cache?.Value ?? CacheValue.Empty, client), loggerFactory,
                                                CacheValue.Empty);
            cache.Start();
        }