File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,60 +20,6 @@ Multiline comments blocks like this ```<!--{}-->``` will be treated as blocks of
2020
2121
2222
23- ---
24-
25-
26- ### Examples
27- #### EXAMPLE 1
28- ``` PowerShell
29- $typesFile, $typeDefinition, $scriptMethod = Invoke-PipeScript {
30- ```
31- types.ps1xml template '
32- <Types >
33- <!-- {param([Alias("TypeDefinition")]$TypeDefinitions) $TypeDefinitions }-->
34- </Types >
35- '
36-
37- typeDefinition.ps1xml template '
38- <Type>
39- <!--{param([Alias("PSTypeName")]$TypeName) "<Name>$($typename)</Name>" }-->
40- <!--{param([Alias("PSMembers","Member")]$Members) "<Members>$($members)</Members>" }-->
41- </Type>
42- '
43-
44- scriptMethod.ps1xml template '
45- <ScriptMethod>
46- <!--{param([Alias("Name")]$MethodName) "<Name>$($MethodName)</Name>" }-->
47- <!--{param([ScriptBlock]$MethodDefinition) "<Script>$([Security.SecurityElement]::Escape("$MethodDefinition"))</Script>" }-->
48- </ScriptMethod>
49- '
50- }
51-
52-
53- $typesFile.Save("Test.types.ps1xml",
54- $typeDefinition.Evaluate(@{
55- TypeName='foobar'
56- Members =
57- @($scriptMethod.Evaluate(
58- @{
59- MethodName = 'foo'
60- MethodDefinition = {"foo"}
61- }
62- ),$scriptMethod.Evaluate(
63- @{
64- MethodName = 'bar'
65- MethodDefinition = {"bar"}
66- }
67- ),$scriptMethod.Evaluate(
68- @{
69- MethodName = 'baz'
70- MethodDefinition = {"baz"}
71- }
72- ))
73- })
74- )
75-
76-
7723---
7824
7925
You can’t perform that action at this time.
0 commit comments