File tree Expand file tree Collapse file tree 4 files changed +135
-1
lines changed
Expand file tree Collapse file tree 4 files changed +135
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ When this is the case it is common for the transpiler to add a ```[ValidateScrip
1818| DisplayName | Synopsis |
1919| ----------------------------------------------------| ---------------------------------------------------------------------|
2020| [ Aliases] ( Aliases.psx.ps1 ) | [ Dynamically Defines Aliases] ( Aliases.psx.ps1 ) |
21+ | [ RemoveParameter] ( RemoveParameter.psx.ps1 ) | [ Removes Parameters from a ScriptBlock] ( RemoveParameter.psx.ps1 ) |
2122| [ ValidateExtension] ( ValidateExtension.psx.ps1 ) | [ Validates Extensions] ( ValidateExtension.psx.ps1 ) |
2223| [ ValidatePlatform] ( ValidatePlatform.psx.ps1 ) | [ Validates the Platform] ( ValidatePlatform.psx.ps1 ) |
2324| [ ValidatePropertyName] ( ValidatePropertyName.psx.ps1 ) | [ Validates Property Names] ( ValidatePropertyName.psx.ps1 ) |
Original file line number Diff line number Diff line change @@ -82,9 +82,31 @@ The script header.
8282| --------------| --------| -------| ---------------------|
8383| ``` [String] ``` | false | 6 | true (ByPropertyName)|
8484---
85+ #### ** AutoParameter**
86+
87+ If provided, will automatically create parameters.
88+ Parameters will be automatically created for any unassigned variables.
89+
90+
91+
92+ | Type | Requried| Postion| PipelineInput|
93+ | --------------| --------| -------| -------------|
94+ | ``` [Switch] ``` | false | named | false |
95+ ---
96+ #### ** AutoParameterType**
97+
98+ The type used for automatically generated parameters.
99+ By default, ``` [PSObject] ``` .
100+
101+
102+
103+ | Type | Requried| Postion| PipelineInput|
104+ | ------------| --------| -------| -------------|
105+ | ``` [Type] ``` | false | 7 | false |
106+ ---
85107### Syntax
86108``` PowerShell
87- New-PipeScript [[-Parameter] <Object>] [[-DynamicParameter] <ScriptBlock>] [[-Begin] <ScriptBlock>] [[-Process] <ScriptBlock>] [[-End] <ScriptBlock>] [[-Header] <String>] [<CommonParameters>]
109+ New-PipeScript [[-Parameter] <Object>] [[-DynamicParameter] <ScriptBlock>] [[-Begin] <ScriptBlock>] [[-Process] <ScriptBlock>] [[-End] <ScriptBlock>] [[-Header] <String>] [-AutoParameter] [[-AutoParameterType] <Type>] [ <CommonParameters>]
88110```
89111---
90112
Original file line number Diff line number Diff line change 1+
2+ RemoveParameter
3+ ---------------
4+ ### Synopsis
5+ Removes Parameters from a ScriptBlock
6+
7+ ---
8+ ### Description
9+
10+ Removes Parameters from a ScriptBlock
11+
12+ ---
13+ ### Related Links
14+ * [ Update-PipeScript] ( Update-PipeScript.md )
15+ ---
16+ ### Examples
17+ #### EXAMPLE 1
18+ ``` PowerShell
19+ {
20+ [RemoveParameter("x")]
21+ param($x, $y)
22+ } | .>PipeScript
23+ ```
24+
25+ ---
26+ ### Parameters
27+ #### ** ParameterName**
28+
29+ The name of one or more parameters to remove
30+
31+
32+
33+ | Type | Requried| Postion| PipelineInput|
34+ | ----------------| --------| -------| -------------|
35+ | ``` [String[]] ``` | true | 1 | false |
36+ ---
37+ #### ** ScriptBlock**
38+
39+ The ScriptBlock that declares the parameters.
40+
41+
42+
43+ | Type | Requried| Postion| PipelineInput |
44+ | -------------------| --------| -------| --------------|
45+ | ``` [ScriptBlock] ``` | true | named | true (ByValue)|
46+ ---
47+ ### Syntax
48+ ``` PowerShell
49+ RemoveParameter [-ParameterName] <String[]> -ScriptBlock <ScriptBlock> [<CommonParameters>]
50+ ```
51+ ---
52+
53+
Original file line number Diff line number Diff line change 1+
2+ RenameVariable
3+ --------------
4+ ### Synopsis
5+ Renames variables
6+
7+ ---
8+ ### Description
9+
10+ Renames variables in a ScriptBlock
11+
12+ ---
13+ ### Related Links
14+ * [ Update-PipeScript] ( Update-PipeScript.md )
15+ ---
16+ ### Examples
17+ #### EXAMPLE 1
18+ ``` PowerShell
19+ {
20+ [RenameVariable(VariableRename={
21+ @{
22+ x='x1'
23+ y='y1'
24+ }
25+ })]
26+ param($x, $y)
27+ } | .>PipeScript
28+ ```
29+
30+ ---
31+ ### Parameters
32+ #### ** VariableRename**
33+
34+ The name of one or more parameters to remove
35+
36+
37+
38+ | Type | Requried| Postion| PipelineInput|
39+ | -------------------| --------| -------| -------------|
40+ | ``` [IDictionary] ``` | true | 1 | false |
41+ ---
42+ #### ** ScriptBlock**
43+
44+ The ScriptBlock that declares the parameters.
45+
46+
47+
48+ | Type | Requried| Postion| PipelineInput |
49+ | -------------------| --------| -------| --------------|
50+ | ``` [ScriptBlock] ``` | true | named | true (ByValue)|
51+ ---
52+ ### Syntax
53+ ``` PowerShell
54+ RenameVariable [-VariableRename] <IDictionary> -ScriptBlock <ScriptBlock> [<CommonParameters>]
55+ ```
56+ ---
57+
58+
You can’t perform that action at this time.
0 commit comments