Re: [nant-dev] bug - Calling SysInfo Twice

2002-10-19 Thread Tomas Restrepo
Hi Ian, So I'm happy to go with Tomas's solution - leaving the sys properties non read only. OK, I'm game. I've done the fix and added a couple of new unit tests to the SysInfo task to ensure both conditions hold true :) While looking through the code, though, I noticed that the code in

RE: [nant-dev] bug - Calling SysInfo Twice

2002-10-19 Thread Shaw, Gerry
While looking through the code, though, I noticed that the code in PropertyDictionary's indexer is: set { if (!_readOnlyProperties.Contains(name)) { Dictionary[name] = value; } } Now, this will silently be ignored if the property is readonly. Somehow, I don't think this is

RE: [nant-dev] bug - Calling SysInfo Twice

2002-10-19 Thread Smith, Eric V.
element could be used. Or maybe a different attribute name instead of value, like value-if-undefined. -Original Message- From: Shaw, Gerry [mailto:grshaw;ea.com] Sent: Saturday, October 19, 2002 2:04 PM To: Tomas Restrepo; Nant-Developers (E-mail) Subject: RE: [nant-dev] bug - Calling SysInfo

Re: [nant-dev] bug - Calling SysInfo Twice

2002-10-18 Thread Tomas Restrepo
Hi Kevin, I traced it to PropertyDictionary.cs not checking to see if a property was already present before adding it. Here is my fix sorry about the lack of diff. Basically added a check to not allow duplicates to the PropertyDictionary. The fix seems to already have been commited by

RE: [nant-dev] bug - Calling SysInfo Twice

2002-10-18 Thread Scott Hernandez
+1 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. What does anybody else think? -- Tomas Restrepo

Re: [nant-dev] bug - Calling SysInfo Twice

2002-10-18 Thread Ian MacLean
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

RE: [nant-dev] bug - Calling SysInfo Twice

2002-10-18 Thread Shaw, Gerry
It might be uesful to be able to poke values into the environment from the build file for various tasks that use them. When I get around to syncing my version and the public version of nant I've made a change to the exec task that does something like this: The task looks for properties