17 using System.Collections.Concurrent;
29 private readonly ConcurrentDictionary<SecurityIdentifier, Exchange> _primaryExchangeBySid;
37 _mapFileProvider = mapFileProvider;
38 _primaryExchangeBySid =
new ConcurrentDictionary<SecurityIdentifier, Exchange>();
49 if (!_primaryExchangeBySid.TryGetValue(securityIdentifier, out primaryExchange))
52 .ResolveMapFile(securityIdentifier.
Symbol, securityIdentifier.
Date);
53 if (mapFile !=
null && mapFile.Any())
55 primaryExchange = mapFile.Last().PrimaryExchange;
57 _primaryExchangeBySid[securityIdentifier] = primaryExchange;
60 return primaryExchange;