Пример #1
0
        public bool TryGetAssetPairQuoteSubst(string substAsset, string instrument, string legalEntity,
                                              out IAssetPair assetPair)
        {
            assetPair = null;
            var baseAssetPair = GetAssetPairByIdOrDefault(instrument);

            if (baseAssetPair == null)
            {
                return(false);
            }

            return(_assetPairsByAssets.Get().TryGetValue(
                       GetAssetPairKey(baseAssetPair.BaseAssetId, substAsset, legalEntity), out assetPair));
        }
 public IEnumerable <CrossRateCalcInfo> GetDependentAssetPairs([NotNull] string assetPairId)
 {
     if (assetPairId == null)
     {
         throw new ArgumentNullException(nameof(assetPairId));
     }
     return(_dependentAssetPairs.Get()[assetPairId].RequiredNotNullElems("result"));
 }
Пример #3
0
        public ImmutableHashSet <string> GetAllIds()
        {
            _readerWriterLockSlim.EnterReadLock();

            try
            {
                return(_assetPairsIds.Get());
            }
            finally
            {
                _readerWriterLockSlim.ExitReadLock();
            }
        }
Пример #4
0
        public bool TryGetAssetPairQuoteSubst(string substAsset, string instrument, string legalEntity,
                                              out IAssetPair assetPair)
        {
            _readerWriterLockSlim.EnterReadLock();

            try
            {
                assetPair = null;
                var baseAssetPair = GetAssetPairByIdOrDefault(instrument);
                if (baseAssetPair == null)
                {
                    return(false);
                }

                return(_assetPairsByAssets.Get().TryGetValue(
                           GetAssetPairKey(baseAssetPair.BaseAssetId, substAsset, legalEntity), out assetPair));
            }
            finally
            {
                _readerWriterLockSlim.ExitReadLock();
            }
        }
Пример #5
0
 public IReadOnlyDictionary <string, AssetPairInfo> Get()
 {
     return(_assetPairs.Get());
 }
Пример #6
0
 public ImmutableHashSet <string> GetAllIds()
 {
     return(_assetPairsIds.Get());
 }
Пример #7
0
 public ImmutableDictionary <string, ImmutableArray <DayOffExclusion> > GetCompiledExclusions()
 {
     return(_exclusionsByAssetPairId.Get());
 }