refactor: Load IDataStreamFactory(s) with dependency injection

So we can create ViewStreams that depend on other services, config, etc.
Previously, the PrimitiveManager relied purely on static construction of
types through reflection.
This commit is contained in:
John Colvin committed 2025-11-19 13:53:18 -05:00
1 parent 7566b2560f
commit ea0a1fbcd3
59 files changed
+2124 -161

No files matched your search

@@ -43,14 +43,13 @@ namespace bts.BlueOrb {
IDisposable? subscription;
// TODO: add cons for symbol, exchange etc
public InstrumentsStream()
: this(ViewStreamDatabase.instance) {
}
public InstrumentsStream(MarketDataClient mdClient)
: this(mdClient, ViewStreamDatabase.instance) { }
public InstrumentsStream(ViewStreamDatabase vsd) {
public InstrumentsStream(MarketDataClient mdClient, ViewStreamDatabase vsd) {
bts.Log.Gen.info("InstrumentsStream.cons");
_vsd = vsd;
_md_client = new MarketDataClient(new MDSource(TimeSpan.FromSeconds(0.5)));
_md_client = mdClient;
}
protected override void myOnFirstSubscriber() {