public void CreateEdges(DataSourceList datasources, MethodList methods, ScreenList screens, DatabaseList databases, FieldList fields, IndexList indexes) { foreach (var applicationNode in applications.Values) { applicationNode.Application.DataSourceList.ForEach((dataSourceInfo) => AddDataSourceEdgeToApplicationNode(applicationNode, dataSourceInfo, datasources, methods, screens, databases, fields, indexes)); } foreach (var applicationNode in applications.Values) { ColorEdges(applicationNode); } }
void AddDataSourceEdgeToApplicationNode(ApplicationNode applicationNode, DataSourceInfo dataSourceInfo, DataSourceList datasources, MethodList methods, ScreenList screens, DatabaseList databases, FieldList fields, IndexList indexes) { var applicationInfo = applicationNode.Application; if (dataSourceInfo.DatabaseType == DatabaseType.NormalDatabase) { var dataSourceNode = datasources.FindDataSourceNode(applicationInfo, dataSourceInfo); AddEdge(applicationNode, AdlibEdgeType.HasDataSource, dataSourceNode); dataSourceInfo.ListScreenList.ForEach(screenName => screens.LinkScreenToNode(applicationInfo, dataSourceNode, screenName, AdlibEdgeType.UsesListScreen)); dataSourceInfo.DetailScreenList.ForEach(screenName => screens.LinkScreenToNode(applicationInfo, dataSourceNode, screenName, AdlibEdgeType.UsesDetailScreen)); dataSourceInfo.MethodList.ForEach(methodInfo => methods.LinkMethodToNode(applicationInfo, dataSourceNode, methodInfo, screens)); var databasePath = DatabasePath(applicationInfo, dataSourceInfo); screens.LinkScreensToDataSourceNode(applicationInfo, databases, fields, indexes, dataSourceInfo.DetailScreenList, databasePath); screens.LinkScreensToDataSourceNode(applicationInfo, databases, fields, indexes, dataSourceInfo.ListScreenList, databasePath); } }
public DataSourceNode(ApplicationInfo applicationInfo, DataSourceInfo dataSourceInfo) : base(DataSourceList.Path(applicationInfo, dataSourceInfo), dataSourceInfo.TextList[0].Text) { DataSource = dataSourceInfo; }