binance-client-websocket
binance-client-websocket copied to clipboard
Update streams objects to publicly expose underlying Subjects
I've exposed the underlying Subject<T>
members in the BinanceClientStreams
class. This is because I want to be able to stream fake messages for testing my program which uses this library. Although that was already possible by using fake IWebsocketClient
objects, that method is very clunky and requires that I send raw text instead of just POCO objects. There is no good reason for hiding the Subject<T>
members behind IObservable<T>
, so the most straight-forward way to enable easy testing is to just expose the Subject<T>
members directly.
Summary of changes:
- Update streams object to publicly expose underlying Subjects instead of just IObservables (to facilitate testing in consuming code by sending fake messages)
- Introduce new
IBinanceWebsocketClient
interface - Remove superfluous
IBinanceCommunicator
interface and implementation class - Refactor to use file-scoped namespaces
- Remove custom validation utility (so that exception stack traces are raised from the method itself rather than the ulitity method)
- Replace
LibLog
package reference withMicrosoft.Extensions.Logging.Abstractions
(asLigLog
is marked as deprecated) - Update other NuGet packages to the latest versions