PSClassUtils icon indicating copy to clipboard operation
PSClassUtils copied to clipboard

Refactor: Write-CUClassDiagram

Open Stephanevg opened this issue 7 years ago • 3 comments

having parameter $Path and $FolderPath is cumbersome for the end user. Perhaps it make sense to add a little bit of logic, and get rid of the FolderPath parameter.

Function Write-CUClassDiagram {

  
    [CmdletBinding()]
    Param(
    
        
        [Parameter(Mandatory=$true,ParameterSetName='File')]
        [ValidateScript({
                test-Path $_
        })]
        [String]
        $Path,

        [Parameter(Mandatory=$true,ParameterSetName='Folder')]
        [ValidateScript({
                test-Path $_
        })]

        [String]
        $FolderPath,

        [Parameter(Mandatory=$False,ParameterSetName='Folder')]
        [Switch]
        $Recurse,

side effects:

This might have side effects on:

  • Out-CUPsGraph
  • Export-PsGraph

Stephanevg avatar Oct 05 '18 16:10 Stephanevg

i'll try work on it ! path parameter may accept a file .\file.psm1, a fullname file c:\user\user1\class.psm1 or a folder

LxLeChat avatar Oct 05 '18 16:10 LxLeChat

ok @LxLeChat It is all yours! :)

Stephanevg avatar Oct 05 '18 18:10 Stephanevg

C'est fini ça non @LxLeChat ?

Stephanevg avatar Dec 12 '18 17:12 Stephanevg