Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add -Raw parameter to functions #46

Open
Stephanevg opened this issue Oct 14, 2018 · 2 comments
Open

Feature Request: Add -Raw parameter to functions #46

Stephanevg opened this issue Oct 14, 2018 · 2 comments
Labels
enhancement New feature or request Feature Request New features to potentially be added good first issue Good for newcomers hacktoberfest Good first use to gain a PR for Hacktoberfest question Further information is requested

Comments

@Stephanevg
Copy link
Owner

Stephanevg commented Oct 14, 2018

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

  • Get-CUClassMethod
  • Get-CUClassConstructor
  • Get-CUClassProperty

** Edit **

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

  • ClassName
  • $TypeName (Where $typeName is either Constructor, Method or Property).

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?

@Stephanevg Stephanevg added enhancement New feature or request good first issue Good for newcomers question Further information is requested Feature Request New features to potentially be added hacktoberfest Good first use to gain a PR for Hacktoberfest labels Oct 14, 2018
@LxLeChat
Copy link
Collaborator

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
Copy link
Owner Author

Stephanevg commented Oct 18, 2018

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

@Stephanevg Stephanevg added this to To do in Enhancements Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Feature Request New features to potentially be added good first issue Good for newcomers hacktoberfest Good first use to gain a PR for Hacktoberfest question Further information is requested
Projects
Enhancements
  
To do
Development

No branches or pull requests

2 participants