Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix XElement copy, added unit tests & vsproject #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix XElement copy, added unit tests & vsproject #11

wants to merge 1 commit into from

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.

None yet

2 participants