public DataCollector(DataCollectorParameters parameters) : base(parameters.Logger) { _parameters = parameters; _parameters.SpecificationRepository.SetFolder(PluginLoader.SpecificationFolder); _parameters.ReferenceRepository.SetFolder(PluginLoader.ReferenceFolder); _parameters.MeasurementDataRepository.SetFolder(PluginLoader.MeasurementDataFolder); _parameters.Logger.LogMethodInfo("Instantiated."); }
public object Create(Type t, string name) { if (t.IsAssignableFrom(typeof(IDataCollector))) { if (!_dataCollectorDict.ContainsKey(name)) { DataCollectorParameters param = new DataCollectorParameters(); if (param.Load(name)) { DataCollector instance = new DataCollector(param); _dataCollectorDict.Add(name, instance); } } return(_dataCollectorDict[name]); } return(null); }