1
- # Generated at 03/12 /2019 08:24:26 by Stephane van Gulick
1
+ # Generated at 03/13 /2019 00:53:08 by Stephane van Gulick
2
2
# Needed for 07_CUInterfaceAuthor
3
3
4
4
using namespace System.Collections.Generic
@@ -489,7 +489,7 @@ Class CUClassGraphOptions {
489
489
}
490
490
491
491
Class CUDiagram {
492
- [ String ] $GraphVizDocument
492
+ $GraphVizDocument
493
493
[Object []]$Objects
494
494
[CUClassGraphOptions ]$Options
495
495
@@ -778,7 +778,7 @@ Function Out-CUPSGraph {
778
778
)
779
779
780
780
begin {
781
- Write-Verbose " Out-CUPSGraph -> BEGIN BLOCK... "
781
+
782
782
$AllGraphs = @ ()
783
783
if (! (Get-Module - Name PSGraph)){
784
784
# Module is not loaded
@@ -792,14 +792,16 @@ Function Out-CUPSGraph {
792
792
}
793
793
794
794
process {
795
- Write-Verbose " Out-CUPSGraph -> PROCESS BLOCK... "
795
+
796
796
[System.Collections.ArrayList ]$AllClasses = @ ()
797
+ $inputObjectGrouped = $inputObject | Group Path
797
798
# $Graph = Graph -Attributes @{splines='ortho'} -ScriptBlock {
798
799
$Graph = Graph - ScriptBlock {
799
- foreach ($obj in $inputObject ){
800
+ foreach ($obj in $inputObjectGrouped ){
800
801
$CurrName = split-Path - leaf $obj.Name
801
- subgraph - Attributes @ {label = ($CurrName )} - ScriptBlock {
802
- Foreach ( $Class in $obj ) {
802
+ subgraph - Attributes @ {label = ($CurrName )} - ScriptBlock {
803
+
804
+ Foreach ( $Class in $obj.group ) {
803
805
804
806
If ($IgnoreCase ){
805
807
$RecordName = ConvertTo-TitleCase - String $Class.Name
@@ -917,7 +919,7 @@ Function Out-CUPSGraph {
917
919
}# End SubGraph
918
920
919
921
# # InHeritance
920
- Foreach ($class in ($Obj | where-Object IsInherited)){
922
+ Foreach ($class in ($inputObjectGrouped .group | where-Object IsInherited)){
921
923
If ($IgnoreCase ){
922
924
$Parent = ConvertTo-TitleCase - String $Class.ParentClassName
923
925
$Child = ConvertTo-TitleCase - String $Class.Name
@@ -926,7 +928,7 @@ Function Out-CUPSGraph {
926
928
$Parent = $Class.ParentClassName
927
929
$Child = $Class.Name
928
930
}
929
- edge - From $Parent - To $Child - Attributes @ {arrowhead = " empty" }
931
+ edge - From $Parent - To $Child - Attributes @ {dir = " back " ; arrowhead = " empty" }
930
932
}
931
933
932
934
# #Composition
@@ -935,7 +937,7 @@ Function Out-CUPSGraph {
935
937
Write-Verbose " Out-CUPSGraph -> ShowCoposition"
936
938
# foreach class.Property.Type if in list of customClasses, then it is composition
937
939
# # replace brackets when property type is an array of type
938
- Foreach ($ClassProperty in $obj.property ){
940
+ Foreach ($ClassProperty in $obj.group. property ){
939
941
# if( $AllClasses -contains $ClassProperty.type ){
940
942
if ( $AllClasses -contains ($ClassProperty.type -replace ' \[\]' , ' ' ) ){
941
943
write-verbose " Out-CUPSGraph -> Composition relationship found:"
@@ -953,8 +955,7 @@ Function Out-CUPSGraph {
953
955
}
954
956
955
957
end {
956
- Write-Verbose " Out-CUPSGraph -> END BLOCK..."
957
- Write-Verbose " Out-CUPSGraph -> END BLOCK: return graphs..."
958
+
958
959
Return $AlLGraphs
959
960
960
961
0 commit comments