Open Stephanevg opened 5 years ago
I have advanced pretty well.
It seems like most of the work for [CUDiagram] is done. I managed to keep things simple in this first version by reusing existing functions (Export-PSGraph).
Ideally, Export-PSGraph should also be refactored into a method in CUDiagram.
Open points:
Tests done:
[x] One Class in one file
[ ] Multiple classes in one file Every class is displayed as beening in their own subgraph, with the subgraph as name. this is wrong. It should be grouped by the file name.
[ ] Classses throughout different files Every class is in a subgraph with their own name. This is wrong, and should be the name of the file they were in. Also, several classes are in the same file (Pester.ps1 for example) and all these classes should be displayed as such.
The cmdlet is very big, and contains a lot of repetitive code. It also calls two child functions, which are probably not necessary (New-GraphPArameters and New-CUGraphExport)
New-CUGraphParameters
this is the code of the function:
New-CUGraphExport
This function is actually just a wrapper for Export-PSGraph, which needs a 'graph' as input. In the current version, it is generated using
Out-CUGraphParameters
. (see above).This is a wrapper for Out-CUPsGraph.
It would be nice to simplify this function, to enable potential futur extensions to it. Some thoughts on how to achiev this: