@@ -21,15 +21,15 @@ HTTP Accept indicates what content types the web request will accept as a respon
2121 # Defines one or more parameters for a ScriptBlock.
2222 # Parameters can be defined in a few ways:
2323 # * As a ```[Collections.Dictionary]``` of Parameters
24- # * As the ```[string]``` name of an untyped parameter.
24+ # * As the ```[string]``` name of an untyped parameter.
2525 # * As a ```[ScriptBlock]``` containing only parameters.
2626 [Parameter (ValueFromPipelineByPropertyName )]
2727 [ValidateScriptBlock (ParameterOnly)]
2828 [ValidateTypes (TypeName= {
29- [Collections.IDictionary ],
29+ [Collections.IDictionary ],
3030 [string ],
31- [Object []],
32- [Scriptblock ],
31+ [Object []],
32+ [Scriptblock ],
3333 [Reflection.PropertyInfo ],
3434 [Reflection.PropertyInfo []],
3535 [Reflection.ParameterInfo ],
@@ -176,39 +176,39 @@ HTTP Accept indicates what content types the web request will accept as a respon
176176 $EachParameter.Value -join [Environment ]::Newline
177177 }
178178 }
179-
180- }
179+
180+ }
181181 # If the parameter was a string
182- elseif ($Parameter -is [string ])
182+ elseif ($Parameter -is [string ])
183183 {
184184 # treat it as parameter name
185- $ParametersToCreate [$Parameter ] =
185+ $ParametersToCreate [$Parameter ] =
186186 @ (
187187 if ($parameterHelp -and $parameterHelp [$Parameter ]) {
188188 $parameterHelp [$Parameter ] | embedParameterHelp
189189 }
190190 " [Parameter(ValueFromPipelineByPropertyName)]"
191191 " `$ $Parameter "
192- ) -join [Environment ]::NewLine
193- }
192+ ) -join [Environment ]::NewLine
193+ }
194194 # If the parameter is a [ScriptBlock]
195- elseif ($parameter -is [scriptblock ])
195+ elseif ($parameter -is [scriptblock ])
196196 {
197-
197+
198198 # add it to a list of parameter script blocks.
199199 $parameterScriptBlocks +=
200- if ($parameter.Ast.ParamBlock ) {
200+ if ($parameter.Ast.ParamBlock ) {
201201 $parameter
202- }
202+ }
203203 }
204- elseif ($parameter -is [Reflection.PropertyInfo ] -or
205- $parameter -as [Reflection.PropertyInfo []] -or
206- $parameter -is [Reflection.ParameterInfo ] -or
204+ elseif ($parameter -is [Reflection.PropertyInfo ] -or
205+ $parameter -as [Reflection.PropertyInfo []] -or
206+ $parameter -is [Reflection.ParameterInfo ] -or
207207 $parameter -as [Reflection.ParameterInfo []] -or
208208 $parameter -is [Reflection.MethodInfo ] -or
209209 $parameter -as [Reflection.MethodInfo []]
210210 ) {
211- if ($parameter -is [Reflection.MethodInfo ] -or
211+ if ($parameter -is [Reflection.MethodInfo ] -or
212212 $parameter -as [Reflection.MethodInfo []]) {
213213 $parameter = @ (foreach ($methodInfo in $parameter ) {
214214 $methodInfo.GetParameters ()
@@ -217,7 +217,7 @@ HTTP Accept indicates what content types the web request will accept as a respon
217217
218218 foreach ($prop in $Parameter ) {
219219 if ($prop -is [Reflection.PropertyInfo ] -and -not $prop.CanWrite ) { continue }
220- $paramType =
220+ $paramType =
221221 if ($prop.ParameterType ) {
222222 $prop.ParameterType
223223 } elseif ($prop.PropertyType ) {
@@ -251,26 +251,26 @@ HTTP Accept indicates what content types the web request will accept as a respon
251251 ' $' + $prop.Name
252252 ) -ne ' '
253253 }
254- }
254+ }
255255 }
256256
257257 # If there is header content,
258- if ($header ) {
258+ if ($header ) {
259259 $allHeaders += $Header
260260 }
261261
262262 # dynamic parameters,
263- if ($DynamicParameter ) {
263+ if ($DynamicParameter ) {
264264 $allDynamicParameters += $DynamicParameter
265265 }
266266
267267 # begin,
268- if ($Begin ) {
268+ if ($Begin ) {
269269 $allBeginBlocks += $begin
270270 }
271271
272272 # process,
273- if ($process ) {
273+ if ($process ) {
274274 $allProcessBlocks += $process
275275 }
276276
@@ -311,7 +311,7 @@ HTTP Accept indicates what content types the web request will accept as a respon
311311 ' )'
312312
313313 # If any parameters were passed in as ```[ScriptBlock]```s,
314- if ($parameterScriptBlocks ) {
314+ if ($parameterScriptBlocks ) {
315315 $parameterScriptBlocks += [ScriptBlock ]::Create($newParamBlock )
316316 # join them with the new parameter block.
317317 $newParamBlock = $parameterScriptBlocks | Join-PipeScript
0 commit comments