private void addPackageBranch(Tree tree, ParsedPackageDependencyPair parsedPackageDependencyPair) { var branch = new Branch(); if (parsedPackageDependencyPair.NeededPackage != null) { Branch.Append(branch, parsedPackageDependencyPair.NeededPackage); } Branch.Append(branch, parsedPackageDependencyPair.MainPackage); Tree.Append(tree, branch); }
private void handleMainPackageIsNotInTree(Tree tree, Branch branchMainPackage, Branch branchNeededPackage, ParsedPackageDependencyPair parsedPackageDependencyPair) { if (parsedPackageDependencyPair.NeededPackage == null || branchNeededPackage == null) { addPackageBranch(tree, parsedPackageDependencyPair); } else { Branch.Append(branchNeededPackage, parsedPackageDependencyPair.MainPackage); } }