PageData.Property is read-only?

Vote:
 
I used to be able to do : CurrentPage.Property.Add(property) / .Add(propname, property) But since the Property object seem to be read-only, how can I add a property to the PropertyDataCollection of a page? Also it seem strange that the PropertyDataCollection still has Add when its read-only or am I missing something really simple here?
#15677
May 09, 2007 19:33
Vote:
 
Hello, The cache handling has been optimized to pass references to the same object (previous implementation created a clone for each fetch), therefore it needs to be read-only. To get a writable copy, simply do this: PageData x = GetPage(pageLink); PageData y = x.CreateWritableClone(); now you can modify y. There is additional information on this topic that has not yet been published, but it should be online this afternoon. Look under RC1 release notes / breaking changes. Best regards, Magnus Stråle
#16139
May 10, 2007 13:48
Vote:
 
Ah, thank you. :-) That'll do the trick.
#16140
May 11, 2007 14:58
Vote:
 
Shouldn't this be in the exception message? No small change to how EPiServer works in my opinion.
#19357
Apr 07, 2008 21:31
Vote:
 
It's a big change that had to be done, I have seen performance boosts ranging from 30% to 7000% depending on the number of pages you read per page request.
#19358
Apr 07, 2008 22:09
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.