16 using System.Collections.Generic;
26 private readonly Dictionary<Symbol, int> _symbolWeights;
27 private readonly List<Symbol> _symbols;
28 private readonly
object _locker =
new();
49 return _symbols.Count;
63 return _symbols.Contains(symbol);
71 public IReadOnlyCollection<Symbol>
Symbols
77 return _symbols.ToList();
89 _symbolWeights = symbolWeights;
90 _symbols =
new List<Symbol>();
100 : this(null, webSocket)
112 _symbols.Add(symbol);
115 if (_symbolWeights !=
null && _symbolWeights.TryGetValue(symbol, out var weight))
129 _symbols.Remove(symbol);
132 if (_symbolWeights !=
null && _symbolWeights.TryGetValue(symbol, out var weight))