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

Extend Open XML SDK #45

Merged
merged 6 commits into from
Jul 14, 2015
Merged

Conversation

ThomasBarnekow
Copy link
Collaborator

@EricWhiteDev This is the PR we talked about. It contains:

  • Save and Clone functionality (thread-safe through locking),
  • Flat OPC conversion (leveraging some of the code that you published),
  • CreateFromTemplate, and
  • XName properties for both OpenXmlElement and OpenXmlAttribute.

The "Save and Clone functionality" and "Flat OPC conversion" is what @EricWhiteDev and I discussed quite a while ago. CreateFromTemplate lets you create a document from a template.

Another commit adds an XName property to both OpenXmlElement and OpenXmlAttribute. This supports integration with projects using Linq for XML.

NUnit-based tests can be found here: https://github.com/ThomasBarnekow/Open-XML-SDK-Tests. We should talk about turning them into xUnit tests (because other tests @EricWhiteDev has implemented are also based on xUnit) and including them in a companion test project.

All my tests (not only the unit tests) pass. And those unit tests also cover multithreading scenarios (because I'm using the functionality in multithreaded server-side scenarios).

When cloning documents in multithreaded scenarios this typically lead to
exceptions thrown by the underlying System.IO.Packaging code. This commit,
therefore, adds locks to the Save() and Clone() methods to prevent those
exceptions from being thrown.
Add unit tests and related test documents for the "save and clone", "Flat OPC",
and "create from template" functionality added to the SDK.

Correct assembly name and default namespace settings in project files. Correct
namespace names of existing unit tests.
EricWhiteDev added a commit that referenced this pull request Jul 14, 2015
@EricWhiteDev EricWhiteDev merged commit 7048bb3 into dotnet:vNext Jul 14, 2015
@ThomasBarnekow
Copy link
Collaborator Author

@EricWhiteDev Thanks for merging this!

@ThomasBarnekow ThomasBarnekow deleted the vExtensions branch July 25, 2015 09:25
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