From: Gert D. <ger...@te...> - 2009-05-13 19:03:51
|
Hi Ken, Tony, This is definitely something that I've considered as well. Can one of you work out a proposal that can be discussed on the list? Gert From: Bjerstedt, Tony [Audatex - Americas] [mailto:Ton...@au...] Sent: woensdag 13 mei 2009 20:01 To: Parrish, Ken; nan...@li... Subject: Re: [NAnt-users] <call> task with parameters ... I have wondered the same thing. If this were added, I would suggest an approach similar to XSLT. An XSLT like approach would look something like: <call target="name"> <with-parameter name="param1" value="."/> <with-parameter name="param2" value="."/> . </call> and <target name="name"> <parameter name="param1" default="value"/> <parameter name="param2" /> . </target> A couple of years ago I started playing with this type of approach. From: Parrish, Ken [mailto:KPa...@go...] Sent: Wednesday, May 13, 2009 10:56 AM To: nan...@li... Subject: [NAnt-users] <call> task with parameters ... Has there ever been any consideration to creating a mechanism for executing the <call> task with a set of private, local parameters (properties) which are only available inside the called task? I'm not sure exactly how the syntax would work, but the idea would be to pass, as an argument to the <call> task, a list of name/value pairs, or a list of values that are identified by place or order. I find the I often need to fabricate some sort of parameter passing mechanism, using globally defined <properties> , to control <task>s that are designed to be general purpose. Typically, I'll create <property> elements that have names which include the name of the task: <property name="mytask_sourceDir" value="sourceValue" /> <call task="mytask" /> I'd much prefer something like: <call task="mytask" parameters="sourceDir=sourceValue" /> The assumption would be that the parameter 'sourceDir' is visible only inside 'mytask'. Thoughts, ideas, considerations? Ken Parrish Gomez, Inc. - --------------------------------------------------------------------------- PRIVILEGE AND CONFIDENTIALITY NOTICE The information in this electronic mail (and any associated attachments) is intended for the named recipient(s) only and may contain privileged and confidential information. If you have received this message in error, you are hereby notified that any use, disclosure, copying or alteration of this message is strictly prohibited. If you are not the intended recipient(s), please contact the sender by reply email and destroy all copies of the original message. Thank you. - -------------------------------------------------------------------------- Internal Virus Database is out of date. Checked by AVG - www.avg.com Version: 8.5.285 / Virus Database: 270.12.2/2072 - Release Date: 04/21/09 16:48:00 |