Bug in ProjectTrakcer20cs ResourceList.cs?

Bug in ProjectTrakcer20cs ResourceList.cs?

Old forum URL: forums.lhotka.net/forums/t/1404.aspx


Doug Ramirez posted on Thursday, October 05, 2006

I believe this is a bug, but I'm new to CSLA 2.1 so I thought I'd post it to be safe.

In the DataPortal_Fetch private method the ResourceList turns off readonly (line 45), adds a ResourceInfo object, but then turns off readonly again (line 51) but should probably turn it back on.

So instead of this:

IsReadOnly = false;
while (dr.Read())
{
   ResourceInfo info = new ResourceInfo(dr);
   this.Add(info);
}
IsReadOnly = false;


There should be this:

IsReadOnly = false;
while (dr.Read())
{
   ResourceInfo info = new ResourceInfo(dr);
   this.Add(info);
}
IsReadOnly = true; <-- turn readonly back on

Doug

RockfordLhotka replied on Thursday, October 05, 2006

Wow, it is amazing that this hasn't been caught before! Thanks for pointing it out - I've fixed it in cvs, so it will be fixed for future releases.

Copyright (c) Marimer LLC