Example #1
0
        public async Task <IReadOnlyCollection <AssetSettings> > GetAssetsAsync()
        {
            IReadOnlyCollection <AssetSettings> assetsSettings = _assetsCache.GetAll();

            if (assetsSettings == null)
            {
                assetsSettings = await _assetSettingsRepository.GetAllAsync();

                _assetsCache.Initialize(assetsSettings);
            }

            return(assetsSettings);
        }
Example #2
0
        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);
        }
Example #3
0
 public async Task <IEnumerable <IAssetSettings> > GetAllAsync()
 {
     return(await _assetSettingsRepository.GetAllAsync());
 }