Exemplo n.º 1
0
 public GoogleStorageReleaseRepository(
     IApplicationLifetime lifetime,
     ILoggerFactory loggerFactory,
     GoogleCredential credential)
 {
     client = StorageClient.Create(credential);
     cache  = new TimerCache <CacheValue>(lifetime, CacheRefreshTime, FetchReleases, loggerFactory);
 }
 public GoogleStorageTzdbRepository(
     IApplicationLifetime lifetime,
     ILoggerFactory loggerFactory,
     GoogleCredential credential)
 {
     client = StorageClient.Create(credential);
     cache  = new TimerCache <CacheEntry>(lifetime, CacheRefreshTime, FetchReleases, loggerFactory, CacheEntry.Empty);
     cache.Start();
 }
        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);
        }