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
f65b6b82f2
commit
ada7d4bed1
64 files changed
+2399
-147
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