Skip to content

Commit fa7cc21

Browse files
StartAutomatingStartAutomating
authored andcommitted
ValidateScriptBlock: Adding -IncludeCommand/-ExcludeCommand (Fixes #224)
1 parent 803a10f commit fa7cc21

File tree

1 file changed

+97
-2
lines changed

1 file changed

+97
-2
lines changed

docs/Decorate.md

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,100 @@
1-
Decorate.psx.ps1 [-TypeName] <string[]> [-PassThru] [-Clear] [<CommonParameters>]
2-
Decorate.psx.ps1 [-TypeName] <string[]> -VariableAst <VariableExpressionAst> [-PassThru] [-Clear] [<CommonParameters>]
1+
2+
Decorate
3+
--------
4+
### Synopsis
5+
decorate transpiler
6+
7+
---
8+
### Description
9+
10+
Applies one or more typenames to an object.
11+
By 'decorating' the object with a typename, this enables use of the extended type system.
12+
13+
---
14+
### Examples
15+
#### EXAMPLE 1
16+
```PowerShell
17+
{
18+
$v = [PSCustomObject]@{}
19+
[decorate(&#39;MyTypeName&#39;,Clear,PassThru)]$v
20+
}.Transpile()
21+
```
22+
23+
---
24+
### Parameters
25+
#### **VariableAst**
26+
27+
The variable decoration will be applied to.
28+
29+
30+
31+
> **Type**: ```[VariableExpressionAst]```
32+
33+
> **Required**: true
34+
35+
> **Position**: named
36+
37+
> **PipelineInput**:true (ByValue)
38+
39+
40+
41+
---
42+
#### **TypeName**
43+
44+
The TypeName(s) used to decorate the object.
45+
46+
47+
48+
> **Type**: ```[String[]]```
49+
50+
> **Required**: true
51+
52+
> **Position**: 1
53+
54+
> **PipelineInput**:false
55+
56+
57+
58+
---
59+
#### **PassThru**
60+
61+
If set, will output the object after it has been decorated
62+
63+
64+
65+
> **Type**: ```[Switch]```
66+
67+
> **Required**: false
68+
69+
> **Position**: named
70+
71+
> **PipelineInput**:false
72+
73+
74+
75+
---
76+
#### **Clear**
77+
78+
If set, will clear any underlying typenames.
79+
80+
81+
82+
> **Type**: ```[Switch]```
83+
84+
> **Required**: false
85+
86+
> **Position**: named
87+
88+
> **PipelineInput**:false
89+
90+
91+
92+
---
93+
### Syntax
94+
```PowerShell
95+
Decorate -VariableAst &lt;VariableExpressionAst&gt; [-TypeName] &lt;String[]&gt; [-PassThru] [-Clear] [&lt;CommonParameters&gt;]
96+
```
97+
---
398

499

5100

0 commit comments

Comments
 (0)