Hi,
There's probably an obvious answer to this question, but is there any reason why all the static methods in the framework are being wrappered to be used as 'functions' in NAnt?
E.g. assemblyname::get-assembly-name(string) is just a wrapper for AssemblyName.GetAssemblyName(string), right?
Wouldn't it just be easier to use reflection to pick out and call the requested function? So instead of writing "${math::abs(-6)}" I'd write "${Math.Abs(-6)}". Instead of writing "${path::combine('C:', 'Windows')}" I'd write "${Path.Combine('C:', 'Windows')}".
I don't get how this additional wrapper of converting FrameworkClass.StaticMethod to frameworkclass::static-method provides any value. The framework isn't going to change (much), so surely such wrappering is unnecessary. If it's just so you can provide a few custom NAnt functions (e.g. "nant::get-assembly()", "framework::get-version()" etc.) then surely these functions could be written as regular static methods in the NAnt assembly and called through the same reflection-based mechanism.
Cheers,
Richard.
-----Original Message-----
From: Merrill Cornish [mailto:[EMAIL PROTECTED]]
Sent: 07 October 2004 21:41
To: Gert Driesen; [EMAIL PROTECTED]
Subject: Re: [Nant-users] Invalid cast error in latest nightly
Gert,
Thanks for your prompt help, but I still think this change is as clear as mud. :-)
The function called assemblyname::get-assembly-name() does NOT return an assembly name, despite the function's name. Instead, it returns and "AssemblyName object," which I can't find documented as a type.
On the other hand, the assembly::get-name() function is documented to take and "assembly" argument rather than an AssemblyName object. At the same time, it is documented to return an "AssemblyName," which, while it appears to be another type, is apparently simply a string representing the name of the assembly pointed to by the pathname argument to assemblyname::get-assembly-name().
It's all very confusing.
Merrill
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users
DISCLAIMER: The information contained in this e-mail is confidential and may be privileged. It is intended for the addressee only. If you are not the intended recipient, please delete this e-mail immediately. The contents of this email must not be disclosed or copied without the sender's consent. We cannot accept any responsibility for viruses, so please scan all attachments. The statements and opinions expressed in this message are those of the author and do not necessarily reflect those of the company. The company does not take any responsibility for the views of the author.
