Beispiel #1
0
        private void WriteModule(IModelSystemStructure module, StreamWriter writer)
        {
            if (module.IsMetaModule)
            {
                return;
            }
            writer.WriteLine($"\"{module.Name}_{module.GetHashCode()}\" " +
                             $"[shape=box," +
                             $"label=<{module.Name}");

            if (IncludeModuleType && module.Type != null)
            {
                writer.Write($"<BR/><FONT POINT-SIZE=\"10\">{module.Type}</FONT>");
            }

            if (IncludeDescriptions && module.Type != null && !string.IsNullOrEmpty(module.Description))
            {
                writer.Write($"<BR/><FONT POINT-SIZE=\"10\">{module.Description}</FONT>");
            }

            writer.Write(">,");

            writer.Write("]\r\n");
            if (module.Children != null)
            {
                foreach (var childModule in module.Children)
                {
                    WriteModule(childModule, writer);
                }
            }
        }
Beispiel #2
0
        private void WriteModuleConnections(IModelSystemStructure module, StreamWriter writer)
        {
            if (module.Required && module.Type == null && !IncludeUnused && !module.IsCollection)
            {
                return;
            }

            if (module.IsMetaModule)
            {
                return;
            }
            //only write connections if the module has children
            if (module.Children != null)
            {
                foreach (var child in module.Children)
                {
                    writer.Write(
                        $"\"{module.Name}_{module.GetHashCode()}\" -- \"{child.Name}_{child.GetHashCode()}\"\r\n");
                    WriteModuleConnections(child, writer);
                }
            }
        }
Beispiel #3
0
 private void WriteMetaModule(IModelSystemStructure module, StreamWriter writer)
 {
     if (module.IsMetaModule)
     {
         writer.WriteLine($"\"{module.Name}_{module.GetHashCode()}\" " +
                          $"[shape=box," +
                          $"color=darkblue," +
                          $"style=filled,fillcolor=lightblue," +
                          $"label=<" +
                          $"<FONT COLOR=\"DARKBLUE\" POINT-SIZE=\"16\">{module.Name}</FONT>" +
                          $"<BR/>" +
                          $"<FONT POINT-SIZE=\"12\">{module.Description}</FONT >" +
                          $">" +
                          $"];");
     }
     if (module.Children != null)
     {
         foreach (var childModule in module.Children)
         {
             WriteMetaModule(childModule, writer);
         }
     }
 }