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:
1 parent
7566b2560f
commit
ea0a1fbcd3
59 files changed
+2124
-161
No files matched your search
@@ -2,6 +2,8 @@ namespace Bts.DataStreamExpressions;
|
||||
|
||||
using BCG;
|
||||
|
||||
using Bts.DataStreamCore;
|
||||
|
||||
public abstract class StatementExpression {
|
||||
ViewStream? view;
|
||||
|
||||
@@ -13,10 +15,10 @@ public abstract class StatementExpression {
|
||||
public virtual string? printView(int startCol) =>
|
||||
null;
|
||||
|
||||
public ViewStream? getView(IDictionary<string, StatementExpression> env) =>
|
||||
view ??= myGetView(env);
|
||||
public ViewStream? getView(IDictionary<string, StatementExpression> env, IDataStreamFactory streamFactory) =>
|
||||
view ??= myGetView(env, streamFactory);
|
||||
|
||||
public virtual ViewStream? myGetView(IDictionary<string, StatementExpression> env) =>
|
||||
public virtual ViewStream? myGetView(IDictionary<string, StatementExpression> env, IDataStreamFactory streamFactory) =>
|
||||
null;
|
||||
|
||||
public static string makeCSString(string s) {
|
||||
|
||||
Reference in new issue
Block a user