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

Feature Request: Add -Raw parameter to functions #46

Open Stephanevg opened 6 years ago

Stephanevg commented 6 years ago

currently, the following functions return a specifc, dilated, information from the AST.

Edit

After dfiscussions, we thought it would be interesting to add the following parameters as well:

Also, we want to extend the ASTDocument to return the Name of the class


I think it could be itnerested, to offer the possibility to instead return the specific types (properietary of the modules) that we could return the RAW AST object back.

Do you think this could be something usefull?

LxLeChat commented 6 years ago

I think i juste wrote a function that do that, check the following link: Get-CURaw

PS C:\PsClassUtils> Get-CURaw -Path .\Classes\Private\01_ClassProperty.ps1
        Attributes         : {}
        UsingStatements    : {}
        ParamBlock         :
        BeginBlock         :
        ProcessBlock       :
        EndBlock           : Class ClassProperty {
                                [String]$Name
                                [String]$Type
                                ClassProperty([String]$Name,[String]$Type){
                                    $this.Name = $Name
                                    $This.Type = $Type
                                }
                            }
        DynamicParamBlock  :
        ScriptRequirements :
        Extent             : Class ClassProperty {
                                [String]$Name
                                [String]$Type
                                ClassProperty([String]$Name,[String]$Type){
                                    $this.Name = $Name
                                    $This.Type = $Type
                                }
                            }
        Parent             :
Stephanevg commented 6 years ago

I have written the cmdlet Get-CUClassMethod using the methodology I was thinking of. See here https://github.com/Stephanevg/PSClassUtils/blob/dev/PSClassUtils/Functions/Public/Get-CUClassMethod.ps1