private YumlClassDiagram GenerateClassDiagram(ProjectDetail rootProjectDetail, ProjectDetailsCollection parentProjectDetailsCollection, bool newlineForEachRelationship)
        {
            var classDiagram = new YumlClassDiagram(newlineForEachRelationship);

            GenerateClassDiagramRelationships(rootProjectDetail, parentProjectDetailsCollection, classDiagram.Relationships, newlineForEachRelationship);
            return classDiagram;
        }
        public YumlClassOutput Translate(ProjectDetail rootProjectDetail, ProjectDetailsCollection parentProjectDetailsCollection, bool newlineForEachRelationship = false)
        {
            Logger.Log("Translating ProjectDetail to YumlClassOutput", LogLevel.High);

            var output = new YumlClassOutput();
            output.RootFile = rootProjectDetail.FullPath;

            output.ClassDiagram = GenerateClassDiagram(rootProjectDetail, parentProjectDetailsCollection, newlineForEachRelationship);
            return output;
        }
 private void GenerateClassDiagramRelationships(ProjectDetail projectDetail, ProjectDetailsCollection parentProjectDetailsCollection, List<YumlRelationshipBase> existingRelationships, bool newlineForEachRelationship)
 {
     AddUnqiueRelationship(existingRelationships, GenerateYumlRelationships(projectDetail, parentProjectDetailsCollection, newlineForEachRelationship));
     foreach (var linkObject in projectDetail.ChildProjects)
     {
         var detail = parentProjectDetailsCollection.GetById(linkObject.Id);
         GenerateClassDiagramRelationships(detail, parentProjectDetailsCollection, existingRelationships, newlineForEachRelationship);
     }
 }
        private List<YumlRelationshipBase> GenerateYumlRelationships(ProjectDetail projectDetail, ProjectDetailsCollection projectDetailsCollection, bool newlineForEachRelationship)
        {
            var relationships = new List<YumlRelationshipBase>();
            var detailModel = GenerateClass(projectDetail);

            foreach (var linkObject in projectDetail.ChildProjects)
            {
                var childModel = GenerateClass(projectDetailsCollection.GetById(linkObject.Id));
                relationships.Add(new SimpleAssociation
                {
                    Parent = detailModel,
                    Child = childModel
                });
            }

            foreach (var dllReference in projectDetail.References)
            {
                var childModel = GenerateClass(dllReference);
                relationships.Add(new SimpleAssociation
                {
                    Parent = detailModel,
                    Child = childModel
                });
            }

            return relationships;
        }
 public RootNode()
 {
     ProjectDetails = new ProjectDetailsCollection();
 }
 public RootNode()
 {
     ProjectDetails = new ProjectDetailsCollection();
 }