void LoadApplications(DirectoryInfo directoryInfo, Storage storage) { var fileInfo = directoryInfo.GetFiles("adlib.pbk"); foreach (var file in fileInfo) { var path = file.FullName.ToLower(); var applicationInfo = new ApplicationInfo(path, storage); var applicationNode = new ApplicationNode(path, applicationInfo); Applications.Add(path, applicationNode); foreach (var dataSourceInfo in applicationInfo.DataSourceList) { if (dataSourceInfo.DatabaseType == DatabaseType.NormalDatabase) { var dataSourceNode = new DataSourceNode(applicationInfo, dataSourceInfo); Datasources.Add(dataSourceNode.Path, dataSourceNode); } } } }
internal void Add(string path, DataSourceNode datasourceNode) => datasources[path] = datasourceNode;