Skip to content

Commit

Permalink
Refactor output layer (#5)
Browse files Browse the repository at this point in the history
* Doki.Output.ClassLibrary concept

* support dependency injection for output types

* output loading

* refactor outputs

* doki output extensions concept

* output registration

* fixes

* output options provider

* output options provider

* OutputDirectory parsing

* cleanup

* fixes

* generate docs

* introduce OutputOptions record instead of interface

* fixes

* clear output directory before generations

* docs

* update config schema

* class library output project generation

* generate class lib concept

* class library generation concept

* class library generation

* fixes

* remove documentation content abstractions

* remove documentation object abstractions

* add more flexibility to output writing

* refactor markdown output

* fiixes

* fixes & generate docs

* fix snapshot tests

* remove generated class library from solution

* refactor type documentation

* fixes

* generate docs

* class library output

* class library output generation

* class library output

* remove ClassLibraryOutput
  • Loading branch information
DavidVollmers authored May 7, 2024
1 parent 078de88 commit c93320e
Show file tree
Hide file tree
Showing 88 changed files with 1,153 additions and 761 deletions.
11 changes: 11 additions & 0 deletions Doki.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Doki.TestAssembly.Inheritan
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Doki.TestAssembly.InheritanceChain.Abstractions", "tests\assemblies\Doki.TestAssembly.InheritanceChain.Abstractions\Doki.TestAssembly.InheritanceChain.Abstractions.csproj", "{200E8D34-D772-4D46-A87C-6AD84F8AE731}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Output", "Output", "{568576F3-3D48-459E-B4D2-1790DAE80E7A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Doki.Output.Extensions", "src\Doki.Output.Extensions\Doki.Output.Extensions.csproj", "{A89D22B2-2427-4863-A2D9-9E1BEFF37C61}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -33,6 +37,9 @@ Global
{2DD37B99-1A80-4F0E-B817-BA277DFC6454} = {08041208-BE3D-4BE8-9AF7-806B73985275}
{4ED3E654-E076-463C-B744-A1F5111820E3} = {08041208-BE3D-4BE8-9AF7-806B73985275}
{200E8D34-D772-4D46-A87C-6AD84F8AE731} = {08041208-BE3D-4BE8-9AF7-806B73985275}
{57EF4554-C84D-4988-94CF-9D6E908BE10C} = {568576F3-3D48-459E-B4D2-1790DAE80E7A}
{33DFFEBE-DB9E-4960-BB4E-3B58399E132C} = {568576F3-3D48-459E-B4D2-1790DAE80E7A}
{A89D22B2-2427-4863-A2D9-9E1BEFF37C61} = {568576F3-3D48-459E-B4D2-1790DAE80E7A}
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6F31B87A-2BD3-4FB4-8C08-7E059A338D4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -71,5 +78,9 @@ Global
{200E8D34-D772-4D46-A87C-6AD84F8AE731}.Debug|Any CPU.Build.0 = Debug|Any CPU
{200E8D34-D772-4D46-A87C-6AD84F8AE731}.Release|Any CPU.ActiveCfg = Release|Any CPU
{200E8D34-D772-4D46-A87C-6AD84F8AE731}.Release|Any CPU.Build.0 = Release|Any CPU
{A89D22B2-2427-4863-A2D9-9E1BEFF37C61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A89D22B2-2427-4863-A2D9-9E1BEFF37C61}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A89D22B2-2427-4863-A2D9-9E1BEFF37C61}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A89D22B2-2427-4863-A2D9-9E1BEFF37C61}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
9 changes: 6 additions & 3 deletions docs/api/Doki.Abstractions/Doki/Doki.AssemblyDocumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Package: [Doki.Abstractions](https://www.nuget.org/packages/Doki.Abstractions)
**Represents the documentation for an assembly.**

```csharp
public sealed record AssemblyDocumentation : Doki.ContentList
public sealed record AssemblyDocumentation : Doki.DocumentationObject
```

Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → [ContentList](Doki.ContentList.md) → AssemblyDocumentation
Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → AssemblyDocumentation

Implements: [System.IEquatable<Doki.AssemblyDocumentation>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.AssemblyDocumentation>)

Expand All @@ -37,6 +37,9 @@ Implements: [System.IEquatable<Doki.AssemblyDocumentation>](https://learn.
|FileName|Gets the name of the assembly.|
|Version|Gets the version of the assembly.|
|PackageId|Gets the NuGet package ID of the assembly.|
|Name||
|Description||
|Namespaces||


## Methods
Expand All @@ -47,7 +50,7 @@ Implements: [System.IEquatable<Doki.AssemblyDocumentation>](https://learn.
|PrintMembers(System.Text.StringBuilder)||
|GetHashCode()||
|Equals(System.Object)||
|Equals(Doki.ContentList)||
|Equals(Doki.DocumentationObject)||
|Equals(Doki.AssemblyDocumentation)||


Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System

| |Summary|
|---|---|
|Assemblies|The root of the documentation, containing all assemblies/packages.|
|Object|An object in the documentation. This is the default content type.|
|Root|The root of the documentation, containing all assemblies/packages.|
|Assembly|An assembly in the documentation.|
|Namespace|A namespace in the documentation.|
|TypeReference|A type reference in the documentation.|
Expand All @@ -34,7 +35,7 @@ Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System
|Interface|An interface in the documentation.|
|Type|A type.|
|GenericTypeArgument|A generic type argument.|
|XmlDocumentation|A xml documentation object.|
|Xml|A xml content.|
|Text|A text content.|
|CodeBlock|A code block.|
|Link|A link.|
Expand Down
4 changes: 2 additions & 2 deletions docs/api/Doki.Abstractions/Doki/Doki.DocumentationObject.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public abstract record DocumentationObject

Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → DocumentationObject

Derived: [CodeBlock](Doki.CodeBlock.md), [ContentList](Doki.ContentList.md), [Link](Doki.Link.md), [MemberDocumentation](Doki.MemberDocumentation.md), [TextContent](Doki.TextContent.md)
Derived: [AssemblyDocumentation](Doki.AssemblyDocumentation.md), [CodeBlock](Doki.CodeBlock.md), [DocumentationRoot](Doki.DocumentationRoot.md), [Link](Doki.Link.md), [MemberDocumentation](Doki.MemberDocumentation.md), [NamespaceDocumentation](Doki.NamespaceDocumentation.md), [TextContent](Doki.TextContent.md), [XmlDocumentation](Doki.XmlDocumentation.md)

Implements: [System.IEquatable<Doki.DocumentationObject>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.DocumentationObject>)

Expand All @@ -39,7 +39,7 @@ Implements: [System.IEquatable<Doki.DocumentationObject>](https://learn.mi
|EqualityContract||
|Id|Gets the ID of the documentation object.|
|Parent|Gets the parent of the documentation object.|
|Content|Gets the content type of the documentation object.|
|ContentType|Gets the content type of the documentation object.|


## Methods
Expand Down
49 changes: 49 additions & 0 deletions docs/api/Doki.Abstractions/Doki/Doki.DocumentationRoot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[Packages](../../README.md) / [Doki.Abstractions](../README.md) / [Doki](README.md) /

# DocumentationRoot Class

## Definition

Namespace: [Doki](README.md)

Assembly: [Doki.Abstractions.dll](../README.md)

Package: [Doki.Abstractions](https://www.nuget.org/packages/Doki.Abstractions)

---

```csharp
public sealed record DocumentationRoot : Doki.DocumentationObject
```

Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → DocumentationRoot

Implements: [System.IEquatable<Doki.DocumentationRoot>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.DocumentationRoot>)

## Constructors

| |Summary|
|---|---|
|DocumentationRoot()||


## Properties

| |Summary|
|---|---|
|EqualityContract||
|Assemblies||


## Methods

| |Summary|
|---|---|
|ToString()||
|PrintMembers(System.Text.StringBuilder)||
|GetHashCode()||
|Equals(System.Object)||
|Equals(Doki.DocumentationObject)||
|Equals(Doki.DocumentationRoot)||


5 changes: 3 additions & 2 deletions docs/api/Doki.Abstractions/Doki/Doki.MemberDocumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Implements: [System.IEquatable<Doki.MemberDocumentation>](https://learn.mi

| |Summary|
|---|---|
|MemberDocumentation()|Initializes a new instance of the [MemberDocumentation](Doki.MemberDocumentation.md) class.|
|MemberDocumentation(Doki.MemberDocumentation)|Initializes a new instance of the [MemberDocumentation](Doki.MemberDocumentation.md) class.|
|MemberDocumentation(Doki.MemberDocumentation)||
|MemberDocumentation()||


## Properties
Expand All @@ -41,6 +41,7 @@ Implements: [System.IEquatable<Doki.MemberDocumentation>](https://learn.mi
|Namespace|Gets the namespace of the member.|
|Assembly|Gets the assembly of the member.|
|Summary|Gets the summary of the member.|
|ContentType||


## Methods
Expand Down
51 changes: 51 additions & 0 deletions docs/api/Doki.Abstractions/Doki/Doki.NamespaceDocumentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[Packages](../../README.md) / [Doki.Abstractions](../README.md) / [Doki](README.md) /

# NamespaceDocumentation Class

## Definition

Namespace: [Doki](README.md)

Assembly: [Doki.Abstractions.dll](../README.md)

Package: [Doki.Abstractions](https://www.nuget.org/packages/Doki.Abstractions)

---

```csharp
public sealed record NamespaceDocumentation : Doki.DocumentationObject
```

Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → NamespaceDocumentation

Implements: [System.IEquatable<Doki.NamespaceDocumentation>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.NamespaceDocumentation>)

## Constructors

| |Summary|
|---|---|
|NamespaceDocumentation()||


## Properties

| |Summary|
|---|---|
|EqualityContract||
|Name||
|Description||
|Types||


## Methods

| |Summary|
|---|---|
|ToString()||
|PrintMembers(System.Text.StringBuilder)||
|GetHashCode()||
|Equals(System.Object)||
|Equals(Doki.DocumentationObject)||
|Equals(Doki.NamespaceDocumentation)||


1 change: 1 addition & 0 deletions docs/api/Doki.Abstractions/Doki/Doki.TypeDocumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Implements: [System.IEquatable<Doki.TypeDocumentation>](https://learn.micr
|Fields|Gets the fields of the type.|
|Properties|Gets the properties of the type.|
|Methods|Gets the methods of the type.|
|ContentType||


## Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Implements: [System.IEquatable<Doki.TypeDocumentationReference>](https://l
| |Summary|
|---|---|
|TypeDocumentationReference()|Initializes a new instance of the [TypeDocumentationReference](Doki.TypeDocumentationReference.md) class.|
|TypeDocumentationReference(Doki.TypeDocumentationReference)|Initializes a new instance of the [TypeDocumentationReference](Doki.TypeDocumentationReference.md) class.|
|TypeDocumentationReference(Doki.TypeDocumentationReference)||


## Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Packages](../../README.md) / [Doki.Abstractions](../README.md) / [Doki](README.md) /

# ContentList Class
# XmlDocumentation Class

## Definition

Expand All @@ -12,41 +12,28 @@ Package: [Doki.Abstractions](https://www.nuget.org/packages/Doki.Abstractions)

---

**Represents a list of content.**

```csharp
public record ContentList : Doki.DocumentationObject
public sealed record XmlDocumentation : Doki.DocumentationObject
```

Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → ContentList

Derived: [AssemblyDocumentation](Doki.AssemblyDocumentation.md)
Inheritance: [System.Object](https://learn.microsoft.com/en-us/dotnet/api/System.Object) → [DocumentationObject](Doki.DocumentationObject.md) → XmlDocumentation

Implements: [System.IEquatable<Doki.ContentList>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.ContentList>)
Implements: [System.IEquatable<Doki.XmlDocumentation>](https://learn.microsoft.com/en-us/dotnet/api/System.IEquatable<Doki.XmlDocumentation>)

## Constructors

| |Summary|
|---|---|
|ContentList(Doki.ContentList)||
|ContentList()||


## Fields

| |Summary|
|---|---|
|Assemblies|Represents the assemblies content list.|
|XmlDocumentation()||


## Properties

| |Summary|
|---|---|
|EqualityContract||
|Name|Gets the name of the content list.|
|Description|Gets the description of the content list.|
|Items|Gets the items in the content list.|
|Name||
|Contents||


## Methods
Expand All @@ -58,6 +45,6 @@ Implements: [System.IEquatable<Doki.ContentList>](https://learn.microsoft.
|GetHashCode()||
|Equals(System.Object)||
|Equals(Doki.DocumentationObject)||
|Equals(Doki.ContentList)||
|Equals(Doki.XmlDocumentation)||


4 changes: 3 additions & 1 deletion docs/api/Doki.Abstractions/Doki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

- [AssemblyDocumentation](Doki.AssemblyDocumentation.md)
- [CodeBlock](Doki.CodeBlock.md)
- [ContentList](Doki.ContentList.md)
- [DocumentationContentType](Doki.DocumentationContentType.md)
- [DocumentationObject](Doki.DocumentationObject.md)
- [DocumentationObjectExtensions](Doki.DocumentationObjectExtensions.md)
- [DocumentationRoot](Doki.DocumentationRoot.md)
- [GenericTypeArgumentDocumentation](Doki.GenericTypeArgumentDocumentation.md)
- [Link](Doki.Link.md)
- [MemberDocumentation](Doki.MemberDocumentation.md)
- [NamespaceDocumentation](Doki.NamespaceDocumentation.md)
- [TextContent](Doki.TextContent.md)
- [TypeDocumentation](Doki.TypeDocumentation.md)
- [TypeDocumentationReference](Doki.TypeDocumentationReference.md)
- [XmlDocumentation](Doki.XmlDocumentation.md)


This file was deleted.

Loading

0 comments on commit c93320e

Please sign in to comment.