Skip to content

Conversation

@wgroeneveld
Copy link

Hi there,

Thanks for your deep clone utility class! Turns out XElement is not that easily fooled, you have to use their own copy constructor, I fixed that. Also added some unit tests and created a VStudio project for it.

If you'd like, you can join this commit onto your master branch.

Thanks again,
-- Wouter.

@Burtsev-Alexey
Copy link
Owner

Interesting, gonna check out XElement source codes, but theoretically any .NET code could be copied by this code. Unless XElement uses unmanaged code, or deal with pointers.

@wgroeneveld
Copy link
Author

XElement inherits from XContainer and contains an internal object "content" but everything seems to get copied over just fine. Linq expressions like .However, Elements() don't produce the wanted result. I peeked into the Linq source and they simply traverse the content object (as an XNode) so why shouldn't it work indeed?

@wgroeneveld
Copy link
Author

any news on this? Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants