public async Task <IReadOnlyCollection <AssetSettings> > GetAssetsAsync() { IReadOnlyCollection <AssetSettings> assetsSettings = _assetsCache.GetAll(); if (assetsSettings == null) { assetsSettings = await _assetSettingsRepository.GetAllAsync(); _assetsCache.Initialize(assetsSettings); } return(assetsSettings); }
public async Task <IReadOnlyCollection <Domain.AssetSettings> > GetAllAsync() { IReadOnlyCollection <Domain.AssetSettings> assets = _cache.GetAll(); if (assets == null) { assets = (await _assetSettingsRepository.GetAllAsync()) .Append(UsdAssetSettings) .ToArray(); _cache.Initialize(assets); } return(assets); }
public async Task <IEnumerable <IAssetSettings> > GetAllAsync() { return(await _assetSettingsRepository.GetAllAsync()); }