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