:-) ... cool... the properties do only bind correctly when you have defined a setter AND a getter... without getter, the automatic binding by type (not by name) doesn't work...
power shell parameter binding
hi
I'm writing a Cmdlet (in C++/CLI or C#, whatever...) and, my Cmdlet has 1 parameter (it's an Int32 named a) and I did set the "ValueFromPipeline" to true... now...
I try to pass a value like this
12 | Get-MyFunction
and
it always tells me, that it cannot bind the parameter... so... does someone have a sample showing this? or can someone tell me what could be wrong?
The trace shows this
ParameterBinding Information: 0 : BIND PIPELINE object to parameters: [Get-MyFunction]
ParameterBinding Information: 0 : PIPELINE object TYPE = [System.Int32]
ParameterBinding Information: 0 : RESTORING pipeline parameter's original values
ParameterBinding Information: 0 : Parameter [a] PIPELINE INPUT ValueFromPipeline NO COERCION
... and... well... no idea where to search. Thanks for help.