Exemplo n.º 1
0
 public Task <T> ReadAsync <T>(string path, CancellationToken cancellationToken = default)
 {
     return(_memoryCache.GetOrCreateAsync(
                path, entry =>
     {
         entry.SlidingExpiration = TimeSpan.FromSeconds(_appConfiguration.CacheDurationSec);
         return _decoratedJsonDataSource.ReadAsync <T>(path, cancellationToken);
     }));
 }
Exemplo n.º 2
0
 public Task <IEnumerable <LicenseType> > GetAsync()
 {
     return(_jsonDataSource.ReadAsync <IEnumerable <LicenseType> >(
                Path.Join(Dir, FilePath)));
 }
Exemplo n.º 3
0
 public Task <IEnumerable <LocalString> > GetAsync()
 {
     return(_jsonDataSource.ReadAsync <IEnumerable <LocalString> >(
                Path.Join(Dir, FilePath)));
 }