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
@@ -0,0 +1,26 @@
|
||||
#nullable enable
|
||||
namespace Bts.DataStreamCore;
|
||||
|
||||
using System;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public class StreamArgumentAttribute : Attribute {
|
||||
public StreamArgumentAttribute(params string[] names) {
|
||||
Names = names;
|
||||
RegexNames = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public StreamArgumentAttribute(WellKnownStreamArgumentType wellKnownType, params string[] names) {
|
||||
WellKnownType = wellKnownType;
|
||||
Names = names;
|
||||
RegexNames = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public string[] Names { get; }
|
||||
public string[] RegexNames { get; set; }
|
||||
public int Position { get; set; } = -1;
|
||||
public WellKnownStreamArgumentType WellKnownType { get; }
|
||||
public bool IsRequired { get; set; }
|
||||
public bool AllowCommaSeparatedAliases { get; set; } = true;
|
||||
public Type? ParserType { get; set; }
|
||||
}
|
||||
Reference in new issue
Block a user