< Back

Get-CUClassMethod

Sun Jan 19, 2020 6:23 pm

NAME Get-CUClassMethod



SYNOPSIS

This function returns all existing constructors of a specific powershell class.





SYNTAX

Get-CUClassMethod [-ClassName <String[]>] [-MethodName <String[]>] [-Raw] [<CommonParameters>]



Get-CUClassMethod [-ClassName <String[]>] [-MethodName <String[]>] [-InputObject <CUClass[]>] [-Raw]

[<CommonParameters>]



Get-CUClassMethod [-ClassName <String[]>] [-MethodName <String[]>] [-Path <FileInfo[]>] [-Raw] [<CommonParameters>]





DESCRIPTION

This function returns all existing constructors of a specific powershell class. You can pipe the result of

get-cuclass. Or you can specify a file to get all the constructors present in this specified file.





PARAMETERS

-ClassName <String[]>

Specify the name of the class.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-MethodName <String[]>

Specify the name of a specific Method



Required? false

Position? named

Default value *

Accept pipeline input? false

Accept wildcard characters? false



-InputObject <CUClass[]>

An object, or array of object of type CuClass



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Path <FileInfo[]>

The path of a file containing PowerShell Classes. Accept values from the pipeline.



Required? false

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Raw [<SwitchParameter>]

The raw switch will display the raw content of the Class.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

String





OUTPUTS

CUClassMethod





NOTES





Author: St????????phane van Gulick

Version: 0.7.1

www.powershellDistrict.com

Report bugs or submit feature requests here:

https://github.com/Stephanevg/PowerShellClassUtils



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-CUClassMethod



Return all the methods of the classes loaded in the current PSSession.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-CUClassMethod -ClassName woop



ClassName Name Parameter

--------- ---- ---------

woop woop

woop woop {String, Number}

Return methods for the woop Class.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-CUClassMethod -Path .\\Woop.psm1



ClassName Name Parameter

--------- ---- ---------

woop woop

woop woop {String, Number}

Return methods for the woop Class present in the woop.psm1 file.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\PSClassUtils>Gci -recurse | Get-CUClassMethod -ClassName CuClass



ClassName Name Parameter

--------- ---- ---------

CUClass CUClass {RawAST}

CUClass CUClass {Name, Property, Constructor, Method}

CUClass CUClass {Name, Property, Constructor, Method...}

Return methods for the CUclass Class present somewhere in the c:\\psclassutils folder.











RELATED LINKS