Stephanevg / PSClassUtils

A set of utilities to work with Powershell Classes
http://powershelldistrict.com/how-to-generate-a-uml-diagram-using-powershell/
93 stars 23 forks source link

Refactor: Write-CUClassDiagram #28

Open Stephanevg opened 6 years ago

Stephanevg commented 6 years ago

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:

LxLeChat commented 6 years ago

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

Stephanevg commented 6 years ago

ok @LxLeChat It is all yours! :)

Stephanevg commented 5 years ago

C'est fini ça non @LxLeChat ?