CreateWritableClone on TypedPageData #8

Merged
merged 2 commits into from Oct 16, 2011

2 participants

@croweman

with '#' will be ignored, and an empty message aborts the commit.

unknown Added CreateWritableClone method to TypedPageData
with '#' will be ignored, and an empty message aborts the commit.
e41b389
@joelabrahamsson

Would it be possible to create a new instance of the property group instead of reusing the existing one? I'm thinking that:

var originalName = myPage.MyGroup.Name;
var copy = myPage.CreateWritableClone();
copy.MyGroup.Name = "SomeNewValue";
var nameFromOriginal = myPage.MyGroup.Name;

nameFromOriginal != originalName

That is, unless I misunderstand the code, the behavior allows to change the value in the original object. Not a huge deal, but would be kind of nice if we could keep the behavior consistent with that of PageData.

@croweman
@joelabrahamsson

Would be great if you could do that or point me in the right direction for doing it :)

@joelabrahamsson joelabrahamsson merged commit 43e9100 into joelabrahamsson:master Oct 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment