示例#1
0
 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);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        private YumlClassDiagram GenerateClassDiagram(ProjectDetail rootProjectDetail, ProjectDetailsCollection parentProjectDetailsCollection, bool newlineForEachRelationship)
        {
            var classDiagram = new YumlClassDiagram(newlineForEachRelationship);

            GenerateClassDiagramRelationships(rootProjectDetail, parentProjectDetailsCollection, classDiagram.Relationships, newlineForEachRelationship);
            return(classDiagram);
        }