diff --git a/src/DataStreamSuite/DataStreamCore/DynamicLoading/PrimitiveManager.cs b/src/DataStreamSuite/DataStreamCore/DynamicLoading/PrimitiveManager.cs index 5af878993..4792786ef 100644 --- a/src/DataStreamSuite/DataStreamCore/DynamicLoading/PrimitiveManager.cs +++ b/src/DataStreamSuite/DataStreamCore/DynamicLoading/PrimitiveManager.cs @@ -17,7 +17,6 @@ using System.Linq; using System.Reflection; public class PrimitiveManager : IDataStreamFactory { - private static PrimitiveManager mySelf; readonly List myAssemblyNames = new(); readonly Dictionary myTypeLookupTable = new(); @@ -121,32 +120,6 @@ public class PrimitiveManager : IDataStreamFactory { return result is not null; } - /// - /// Constructs and returns a ViewStream of type corresponding to the friendly name - /// - /// friendly primitive name - /// args can be null or an empty ICollection if the paramterless constructor - /// is the desired one - /// - public ViewStream build(string friendlyName, ICollection args) { - object[] constructorArgs = null; - if (args != null && args.Count > 0) { - constructorArgs = new object[args.Count]; - args.CopyTo(constructorArgs, 0); - } - if (myTypeLookupTable[friendlyName] == null) - throw new ApplicationException(friendlyName + " is not the friendly name of any of the loaded types"); - try { - return - constructorArgs == null ? - Activator.CreateInstance(myTypeLookupTable[friendlyName] as Type) as ViewStream : - Activator.CreateInstance(myTypeLookupTable[friendlyName] as Type, constructorArgs) as ViewStream; - } catch (Exception ex) { - Log.Gen.warn($"PrimitiveManager failed to construct ViewStream type '{friendlyName}': {ex}"); - } - return null; - } - public ViewStream Create(string streamId, IEnumerable<(string Name, int? Index, object Value)> args) => TryResolveType(streamId, out var type) ? Create(type, args) : null;