Skip to content

Commit

Permalink
fixed IOException when writing documentation (fix #39)
Browse files Browse the repository at this point in the history
  • Loading branch information
Doraku committed Mar 23, 2021
1 parent bd26f1c commit 41db055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions documentation/NEXT_RELEASENOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fixed IOException when writing documentation
10 changes: 5 additions & 5 deletions source/DefaultDocumentation/DocumentationGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -224,19 +224,19 @@ bool TryGetDocumentation(IEntity entity, out XElement documentation)

public void WriteDocumentation(string outputFolderPath)
{
_docItems.Values.Where(i => i.GeneratePage).AsParallel().ForAll(i =>
foreach (DocItem item in _docItems.Values.Where(i => i.GeneratePage))
{
try
{
using DocumentationWriter writer = new DocumentationWriter(_fileNameMode, _nestedTypeVisibility, _wikiLinks, _docItems, _links, outputFolderPath, i);
using DocumentationWriter writer = new DocumentationWriter(_fileNameMode, _nestedTypeVisibility, _wikiLinks, _docItems, _links, outputFolderPath, item);

i.WriteDocumentation(writer);
item.WriteDocumentation(writer);
}
catch (Exception exception)
{
throw new Exception($"Error while writing documentation for {i.FullName}", exception);
throw new Exception($"Error while writing documentation for {item.FullName}", exception);
}
});
}
}

public void WriteLinks(string baseLinkPath, string linksFilePath, bool wikiLinks)
Expand Down

0 comments on commit 41db055

Please sign in to comment.