private YumlClassDiagram MakeParentDiagram(ProjectDetail projectDetail, bool newlineForEachRelationship) { var classDiagram = new YumlClassDiagram(newlineForEachRelationship); GenerateParentDiagram(projectDetail, classDiagram.Relationships, newlineForEachRelationship); return(classDiagram); }
private YumlClassDiagram GenerateClassDiagram(ProjectDetail rootProjectDetail, ProjectDetailsCollection parentProjectDetailsCollection, bool newlineForEachRelationship) { var classDiagram = new YumlClassDiagram(newlineForEachRelationship); GenerateClassDiagramRelationships(rootProjectDetail, parentProjectDetailsCollection, classDiagram.Relationships, newlineForEachRelationship); return(classDiagram); }
private YumlClassDiagram MakeDependenciesDiagram(RootNode rootNode, bool newlineForEachRelationship) { var classDiagram = new YumlClassDiagram(newlineForEachRelationship); foreach (var detail in rootNode.ChildProjects) { classDiagram.Relationships.UnionWith(MakeYumlDependencies(detail)); } return(classDiagram); }
private YumlClassDiagram GenerateClassDiagram(RootNode rootNode, bool newlineForEachRelationship) { var classDiagram = new YumlClassDiagram(newlineForEachRelationship); foreach (var detail in rootNode.ProjectDetails) { classDiagram.Relationships.AddRange(GenerateYumlRelationships(detail, rootNode.ProjectDetails, newlineForEachRelationship)); } return(classDiagram); }
/// <summary> /// Generates a document on the server and returns the full url to it. /// </summary> /// <param name="output"></param> /// <returns></returns> public static string GenerateImageOnYumlServer(YumlClassDiagram output) { Logger.Log(string.Format("Generating image on yuml server, class diagram: '{0}'", output), LogLevel.High); ServicePointManager.Expect100Continue = false; var req = WebRequest.Create(YumlClassUrl); //req.Proxy = new System.Net.WebProxy(ProxyString, true); //Add these, as we're doing a POST req.ContentType = "application/x-www-form-urlencoded"; req.Method = "POST"; //We need to count how many bytes we're sending. Post'ed Faked Forms should be name=value& string diagramDescriptionRaw = output.ToString(); string diagramDescription = "dsl_text=" + EncodeForHttpPost(diagramDescriptionRaw); byte[] bytes = Encoding.ASCII.GetBytes(diagramDescription); req.ContentLength = bytes.Length; using (var outputStream = req.GetRequestStream()) { outputStream.Write(bytes, 0, bytes.Length); //Push it out there outputStream.Close(); } string htmlContent; using (var response = req.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream())) { htmlContent = reader.ReadToEnd().Trim(); } } var imageFetcher = new ImageFetcher(htmlContent); var thread = new Thread(imageFetcher.FetchImageSrc); thread.SetApartmentState(ApartmentState.STA); thread.Start(); thread.Join(); return(imageFetcher.ImageUrl); }
public YumlClassOutput(YumlClassDiagram dependenciesDiagram, YumlClassDiagram parentDiagram, string rootFile) { DependencyDiagram = dependenciesDiagram; ParentDiagram = parentDiagram; RootFile = rootFile; }