Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Parameters with ScriptMethod?

14 views
Skip to first unread message

Jim Holbach

unread,
Sep 28, 2006, 8:45:02 AM9/28/06
to
Can I pass parameters to a script method? If so, what's the syntax to use in
the ps1xml file to do that?

Thanks.

Jim Holbach

dreeschkind

unread,
Sep 28, 2006, 9:21:02 AM9/28/06
to
I don't know if param() syntax is also possbile, but $args[...] works just
fine:

<Type>
<Name>System.Int32</Name>
<Members>
<ScriptMethod>
<Name>testargs</Name>
<Script>
"testargs: `$args[0] = `'$($args[0])`' and `$args[1] =
`'$($args[1])`'."
</Script>
</ScriptMethod>
</Members>
</Type>


--
greetings
dreeschkind

Jim Holbach

unread,
Sep 28, 2006, 10:10:02 AM9/28/06
to

Jim Holbach

unread,
Sep 28, 2006, 10:44:02 AM9/28/06
to
Perfect!

Thanks.
---
Jim Holbach

0 new messages