Exemple #1
0
        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);
                    }
                }
            }
        }
Exemple #2
0
 internal void Add(string path, DataSourceNode datasourceNode) => datasources[path] = datasourceNode;