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")); }
public ImmutableHashSet <string> GetAllIds() { _readerWriterLockSlim.EnterReadLock(); try { return(_assetPairsIds.Get()); } finally { _readerWriterLockSlim.ExitReadLock(); } }
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(); } }
public IReadOnlyDictionary <string, AssetPairInfo> Get() { return(_assetPairs.Get()); }
public ImmutableHashSet <string> GetAllIds() { return(_assetPairsIds.Get()); }
public ImmutableDictionary <string, ImmutableArray <DayOffExclusion> > GetCompiledExclusions() { return(_exclusionsByAssetPairId.Get()); }