< Back
Get-CUClassConstructor
Post
NAME Get-CUClassConstructor
SYNOPSIS
This function returns all existing constructors of a specific powershell class.
SYNTAX
Get-CUClassConstructor [-ClassName <String[]>] [-Raw] [<CommonParameters>]
Get-CUClassConstructor [-ClassName <String[]>] [-InputObject <CUClass[]>] [-Raw] [<CommonParameters>]
Get-CUClassConstructor [-ClassName <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
-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
ClassConstructor
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-CUClassConstructor
Return all the constructors of the classes loaded in the current PSSession.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-CUClassConstructor -ClassName woop
ClassName Name Parameter
--------- ---- ---------
woop woop
woop woop {String, Number}
Return constructors for the woop Class.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-CUClassConstructor -Path .\\Woop.psm1
ClassName Name Parameter
--------- ---- ---------
woop woop
woop woop {String, Number}
Return constructors for the woop Class present in the woop.psm1 file.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\PSClassUtils>Gci -recurse | Get-CUClassConstructor -ClassName CuClass
ClassName Name Parameter
--------- ---- ---------
CUClass CUClass {RawAST}
CUClass CUClass {Name, Property, Constructor, Method}
CUClass CUClass {Name, Property, Constructor, Method...}
Return constructors for the CUclass Class present somewhere in the c:\\psclassutils folder.
RELATED LINKS
SYNOPSIS
This function returns all existing constructors of a specific powershell class.
SYNTAX
Get-CUClassConstructor [-ClassName <String[]>] [-Raw] [<CommonParameters>]
Get-CUClassConstructor [-ClassName <String[]>] [-InputObject <CUClass[]>] [-Raw] [<CommonParameters>]
Get-CUClassConstructor [-ClassName <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
-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
ClassConstructor
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-CUClassConstructor
Return all the constructors of the classes loaded in the current PSSession.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-CUClassConstructor -ClassName woop
ClassName Name Parameter
--------- ---- ---------
woop woop
woop woop {String, Number}
Return constructors for the woop Class.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-CUClassConstructor -Path .\\Woop.psm1
ClassName Name Parameter
--------- ---- ---------
woop woop
woop woop {String, Number}
Return constructors for the woop Class present in the woop.psm1 file.
-------------------------- EXAMPLE 4 --------------------------
PS C:\\PSClassUtils>Gci -recurse | Get-CUClassConstructor -ClassName CuClass
ClassName Name Parameter
--------- ---- ---------
CUClass CUClass {RawAST}
CUClass CUClass {Name, Property, Constructor, Method}
CUClass CUClass {Name, Property, Constructor, Method...}
Return constructors for the CUclass Class present somewhere in the c:\\psclassutils folder.
RELATED LINKS