/// <summary> /// Creates and returns a content for a GraphViz (.gv) file (using DOT language), for the visualisation of types that are in the storage. /// For this purpose, a Context is created only for this purpose, and cannot be used for any other. /// </summary> /// <param name="storage">Storage from where the types are extracted</param> /// <returns>content for the GraphViz file</returns> public String GetGraphVizContentFromStorage(IKeyValueStorage <Guid, object> storage) { String graphVizContent; IDictionary <String, TypeVisualUnit> typeUnits = GetTypeVisualUnits(GetRootTypeId()); GVTemplate template = new GVTemplate(typeUnits); graphVizContent = template.TransformText(); return(graphVizContent); }
/// <summary> /// Creates and returns a content for a GraphViz (.gv) file (using DOT language), for the visualisation of types that are in the storage. /// <para>For this purpose, a Context is created only for this purpose, and cannot be used for any other.</para> /// </summary> /// <param name="storage">Storage from where the types are extracted</param> /// <returns>content for the GraphViz file</returns> public String GetGraphVizContentFromStorage(string typeName, IKeyValueStorage <Guid, object> storage) { String graphVizContent; Guid typeId = GetIdFromTypeName(typeName); if (typeId.Equals(Guid.Empty)) { throw new Exception("Type with the following name : " + typeName + " doesn't exist in this Context"); } IDictionary <String, TypeVisualUnit> typeUnits = GetTypeVisualUnits(typeId); GVTemplate template = new GVTemplate(typeUnits); graphVizContent = template.TransformText(); return(graphVizContent); }