Hi all,

I'm very pleased you catch mine idea and take this great discussion!

> There are many places where inter-task communication would be useful.
Having
> the context of what is going on around a task is very interesting. I don't

Yes! I think is is _needed_ in some cases. See requests about resultproperty
of exec, results from call etc. They are all is about contexts.

> As for the XML related tasks (xmlpoke/peek/foreach, solution, style/xsl,
> etc) it would make sense to allow them to interact with a single, possibly
> in-memory, instance of the xml documents (or xpathdoc). I helped write

That is what I already done. Not something great in mine eyes, but 'xml
islands' as MS calls it could be greate to show and useful to some
configurations in some cases.  The better if the same code could be used
even for inter-task communication.

> For tasks (such as the solution task), what about having C# classes in
> NAnt that map to XML itself?  They could appear as XML to
> xmlpeek/xmlpoke/xmlforeach, but would be backed by C# classes internally.

Sure - it is easily doable. But we should consider automatic result
generation first. This result, of course, could't be internally be
XmlDocument but could be set of references to native .net classes +
interface IXPathNavigable. I dont see any problem here.

> *XPathObjectNavigator stuff:
+
> Sounds good. I'll have to go take a look at it. Bamboo.Prevalence that is.

I'm not at home there but it sounds very good! First I think that every task
have to define its results explicitly but now I see it could be build
automagically from task properties!
E.g. for exec:

        /// <summary>
        /// The command-line arguments for the program.
        /// </summary>
        [TaskAttribute("commandline")]
        [TaskResult("input/commandline")]
        public string CommandLineArguments {
            get { return _commandline; }
            set { _commandline = StringUtils.ConvertEmptyToNull(value); }
        }

        /// <summary>
        /// The result code of executed program.
        /// </summary>
        [TaskResult("output/resultcode")]
        public int ResultCode {
            get { return _resultcode; }
        }

that could automagically create result xml (or semi-xml):
<exec-result>
  <input>
    <commandline>1 2 3 4 5</commandline>
  </input>
  <output>
    <resultcode>2</resultcode>
  </output>
</exec-result>

How you like it?

Martin



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to