Skip to content

Commit

Permalink
allow writing member documentation output
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVollmers committed Jun 23, 2024
1 parent f9ffec5 commit 1c5751d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Doki.Output.Abstractions/IOutput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,7 @@ Task WriteAsync(NamespaceDocumentation namespaceDocumentation, CancellationToken
/// <returns>A <see cref="Task"/> representing the asynchronous operation.</returns>
Task WriteAsync(TypeDocumentation typeDocumentation, CancellationToken cancellationToken = default) =>
Task.CompletedTask;

Task WriteAsync(MemberDocumentation memberDocumentation, CancellationToken cancellationToken = default) =>
Task.CompletedTask;
}
20 changes: 20 additions & 0 deletions src/Doki/DocumentationGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,26 @@ private async Task<TypeDocumentation> GenerateTypeDocumentationAsync(GeneratorCo

foreach (var output in context.Outputs)
{
foreach (var memberDocumentation in typeDocumentation.Constructors)
{
await output.WriteAsync(memberDocumentation, cancellationToken);
}

foreach (var memberDocumentation in typeDocumentation.Fields)
{
await output.WriteAsync(memberDocumentation, cancellationToken);
}

foreach (var memberDocumentation in typeDocumentation.Properties)
{
await output.WriteAsync(memberDocumentation, cancellationToken);
}

foreach (var memberDocumentation in typeDocumentation.Methods)
{
await output.WriteAsync(memberDocumentation, cancellationToken);
}

await output.WriteAsync(typeDocumentation, cancellationToken);
}

Expand Down

0 comments on commit 1c5751d

Please sign in to comment.