Tomas Restrepo wrote:


The fix seems to already have been commited by someone else.

that was me :)

However, may I argue _against_ this fix?

There are two reasons I don't like it:
a- It changes semantics. PropertyDictionary inherits from DictionatyBase.
Common semantics in all of .NET standard dictionary collections dictate that
you can't add the same item twice. This change breaks that.

b- Common sence would dictate that the results from the sysinfo task should
be added as readonly properties. Currently, they are not, since it uses
PropertyDictionary::Add(), not AddReadOnly().

My proposal for a fix would actually be to leave PropertyDictionary alone,
and instead modify SysInfo so that it uses indexer access to add it's
properties. That simple change would satisfy both elements I outline above.

OK fair enough. but that still wouldn't make them readonly. I actually like the idea of not having them readonly - at least from the sysinfo tasks point of view. What if a tasks changes some variables and you want a fresh snapshot of the environment ? Although the build file probably shouldn't be able to change them. Hmm that gives me another thought. It might be uesful to be able to poke values into the environment from the build file for various tasks that use them.

So I'm happy to go with Tomas's solution - leaving the sys properties non read only.

Ian

What does anybody else think?
--
Tomas Restrepo
[EMAIL PROTECTED]



-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers




-------------------------------------------------------
This sf.net email is sponsored by:
Access Your PC Securely with GoToMyPC. Try Free Now
https://www.gotomypc.com/s/OSND/DD
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to