17 using System.Collections.Generic;
36 private readonly Dictionary<Symbol, List<Symbol>> _relatedSymbols;
45 _securityProvider = securityProvider;
46 _relatedSymbols =
new ();
85 lock (_relatedSymbols)
89 var underlyingSecurity = _securityProvider.GetSecurity(symbol.
Underlying);
90 if (underlyingSecurity !=
null)
99 if (!_relatedSymbols.TryGetValue(symbol.
Underlying, out var relatedSymbols))
101 _relatedSymbols[symbol.
Underlying] = relatedSymbols =
new List<Symbol>();
103 relatedSymbols.Add(symbol);
108 if (_relatedSymbols.Remove(symbol, out var customSymbols))
111 foreach (var customSymbol
in customSymbols)
113 var customSecurity = _securityProvider.GetSecurity(customSymbol);
114 if (customSecurity !=
null)
125 return securityCache;