Open-XML-SDK
Open-XML-SDK copied to clipboard
Can `LoadFromPart` set `OpenXmlPart` instead?
There are some times where a part is created and we need to have the part set, but it appears that LoadFromPart
cannot set it itself. It would be nice to set it there.
Originally posted by @twsouthwick in https://github.com/OfficeDev/Open-XML-SDK/pull/997#discussion_r697611764
@twsouthwick, as noted in PR #997, setting the OpenXmlPart
in the LoadFromPart
leads to a failed unit test.
Right - the question is if that is a test failure or indication of a different issue.
Long term, it would be better to just have all part constructors take a package and set it in more of RAII style