question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Writing asynchronously with OpenXmlWriter

See original GitHub issue

The OpenXmlWriter doesn’t appear to have any async overloads. Is it not possible to write in a asynchronous fashion?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
clement911commented, Mar 30, 2021

I’m referring to the OpenXmlWriter here though.

I see that the OpenXmlWriter is implemented by OpenXmlPartWriter, which delegates calls to a regular System.Xml.XmlWriter, which does have async overloads for all write operations such as WriteStartElementAsync, WriteAttributeStringAsync, etc…

So it should be possible to add async overloads to the OpenXmlWriter class as well.

0reactions
clement911commented, Apr 2, 2021

@twsouthwick , unfortunately I don’t have enough time at the moment but I’ll keep in mind that you accept PRs and may come back to it later. I haven’t done the analysis of all the classes that could to be made async. I suppose it doesn’t all need to be added at the same time… I guess it’s a matter of finding all of the IO operations, for which .NET provides async overloads. One potential problem is that adding async overloads can cause duplicate code for the sync and async paths. One mitigation is to do sync over async, but I believe it has its own problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing asynchronously with OpenXmlWriter · Issue #913
I see that the OpenXmlWriter is implemented by OpenXmlPartWriter , which delegates calls to a regular System.Xml.XmlWriter , which does have ...
Read more >
Write XML Files asynchronously with .NET - Benjamin Abt
Writing XML files asynchronously is a useful technique for improving the performance and scalability of your application.
Read more >
OpenXML asynchronously C# - Stack Overflow
For those of you proficient in OpenXML, I'm using an Excel file (as resource) as a template for creating auto generated Excel files....
Read more >
Manipulating XML Data with Integrated Readers and ...
As a self-contained component, the MSXML parser provides advanced features such as asynchronous parsing. This feature is apparently lacking in ...
Read more >
XmlWriter.WriteStringAsync(String) Method (System.Xml)
Asynchronously writes the given text content. ... The text to write. ... An XmlWriter method was called before a previous asynchronous operation finished....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found