예제 #1
0
        private void InitializeAssets()
        {
            var assets = _assetsService.AssetGetAll();

            foreach (var asset in assets)
            {
                var name = GetShortestName(asset.Id, asset.Name, asset.DisplayId);
                _lykkeAssets[name] = name;
            }

            _log.Info($"Initialized {_lykkeAssets.Count} of {assets.Count} assets.");
        }
        public void Start()
        {
            var assets = _assetsService.AssetGetAll(true);

            foreach (var asset in assets)
            {
                _cache.Set(GetKey(asset.Id), Mapper.ToAsset(asset));
            }
            _cache.Set(AllKey, new ConcurrentBag <string>(assets.Select(x => x.Id)));
        }
예제 #3
0
        private void InitializeAssets()
        {
            var assets = _assetsService.AssetGetAll();

            foreach (var asset in assets)
            {
                _assets[asset.Id] = new Asset(asset.Id, GetShortestName(asset.Id, asset.Name, asset.DisplayId));
            }

            _log.Info($"Initialized {_assets.Count} of {assets.Count} assets.");
        }