private static TreeNode CreatTreeNode(IModuleConfig module) { var item = new TreeNode(module.ModuleName); module.RequiredModulesNames.ForEach(c => item.Children.Add(CreateEmptyTreeNode(c, false, true))); module.DependingModulesNames.ForEach(c => item.Children.Add(CreateEmptyTreeNode(c, true, false))); module.ProvidedServices.Select(s => s.ServiceName).OrderBy(s => s).ToList().ForEach(c => item.Children.Add(CreateSimpleTreeNode(c))); return item; }
private static TreeNode CreateEmptyTreeNode(ModuleProxy m, bool isDependent, bool isRequired) { TreeNode node = new TreeNode(m.ConfigFileName) { IsDependend = isDependent, IsRequired = isRequired }; node.Children.Add(new TreeNode("Loading...")); return node; }
private static TreeNode CreateEmptyTreeNode(string name, bool isDependent, bool isRequired) { TreeNode node = new TreeNode(name) { IsDependend = isDependent, IsRequired = isRequired }; node.Children.Add(new TreeNode("Loading...")); return node; }
private static TreeNode CreatTreeNode(ModuleProxy module) { var item = new TreeNode(module.ConfigFileName); foreach (var m in module.Children) { item.Children.Add(CreateEmptyTreeNode(m.Value, false, true)); } foreach (var m in module.Dependents) { item.Children.Add(CreateEmptyTreeNode(m, true, false)); } return item; }