Commit Graph

4 Commits

Author SHA1 Message Date
Michael Handschuh fb2f846159 Bug 4722: Prevent Repetitive Factor File Numerical Precision Warnings (#4742)
* Add DataProviderEventArgs base class for IDataProviderEvents event args

This base class includes a Symbol property. This will empower event listeners
to make decisions based on which security (symbol) raised the event. The immediate
use case is preventing multiple numerical precision messages for the same security.
This pattern can equally be applied to other error messages that are raised each
time a security is added to a universe.

See: #BUG-4722

* Update ConcurrentSet.Add to use ISet<T>.Add returning bool

It's a very common pattern to use if (set.Add(item)) which is enabled
via bool ISet<T>.Add(item) but not enabled via void ICollectiont<T>.Add(item).
This change simples changes the default Add implementation to use the ISet<T>
overload and relegates the ICollection<T>.Add implementation to be explicit.

See: #BUG-4722

* Prevent multiple numerical precision messages for same symbol

If a security is continually added/removed from a universe, then the user will
see this message each time the security is added. This results in some spam.
This change simply remembers for which symbols we've notified the user about the
numerical precision issue.

Fixes: #BUG-4722
2020-09-22 21:06:59 -03:00
Martin Molinero 322aa9574d Fix Symbol Equals emtpy
- Fix Symbol Equals Empty implementation
- Improving performance
- Adding unit test
2020-01-16 12:50:30 -03:00
Martin Molinero 0fb1bf8cc6 Keep ConcurrentSet ordered
- `ConcurrentSet` will use a `OrderedDictionary` internally so that items
are ordered deterministically, respecting insertion order.
- Adding unit tests
2019-11-05 16:02:54 -03:00
Michael Handschuh 0564d1e327 Add ConcurrentSet<T>
See: # 3603
2019-09-25 02:28:20 -04:00