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

2002-10-19 Thread Smith, Eric V.
bute on the property 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-mai

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 thin

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 Pro

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 task that does something like this: The task looks for properties that

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 standa

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 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 s