Skip to content

Commit 680e4ad

Browse files
feat: fix return type spacing and add rich xml docs for properties, exceptions, types, and parameters (#27)
1 parent 9818323 commit 680e4ad

File tree

5 files changed

+209
-120
lines changed

5 files changed

+209
-120
lines changed

docs/sample/myclasslib.myclass.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public string MyProperty { get; protected set; }
4242
#### Property Value
4343

4444
[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
45-
The property value.
45+
The property value. Used by [MyClass.DoGeneric&lt;T&gt;(T)](./myclasslib.myclass#dogenerictt).
4646

4747
#### Example
4848

@@ -126,6 +126,34 @@ The second param.
126126
[Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception)<br>
127127
Thrown when...
128128

129+
### **DoGeneric&lt;T&gt;(T)**
130+
131+
Do some thing.
132+
133+
```csharp
134+
public int DoGeneric<T>(T value)
135+
```
136+
137+
#### Type Parameters
138+
139+
`T`<br>
140+
The type argument. Used by [MyClass.DoGeneric&lt;T&gt;(T)](./myclasslib.myclass#dogenerictt).
141+
142+
#### Parameters
143+
144+
`value` T<br>
145+
The param. Used by [MyClass.DoGeneric&lt;T&gt;(T)](./myclasslib.myclass#dogenerictt).
146+
147+
#### Returns
148+
149+
[Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
150+
Returns a value [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32).
151+
152+
#### Exceptions
153+
154+
[ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)<br>
155+
Thrown instead of [Exception](https://docs.microsoft.com/en-us/dotnet/api/system.exception).
156+
129157
### **Get(List&lt;String&gt;)**
130158

131159
Gets some thing.

docs/sample/myclasslib.subnamespace.subclass.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public string MyProperty { get; protected set; }
3838
#### Property Value
3939

4040
[String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
41-
The property value.
41+
The property value. Used by [MyClass.DoGeneric&lt;T&gt;(T)](./myclasslib.myclass#dogenerictt).
4242

4343
#### Example
4444

sample/MyClassLib/MyClass.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class MyClass : IMyInterface
1717
/// <summary>
1818
/// My property.
1919
/// </summary>
20-
/// <value>The property value.</value>
20+
/// <value>The property value. Used by <see cref="DoGeneric{T}(T)"/>.</value>
2121
public string MyProperty { get; protected set; }
2222

2323
/// <summary>
@@ -79,6 +79,15 @@ public MyClass(string firstParam, int secondParam) { }
7979
/// <exception cref="System.Exception">Thrown when...</exception>
8080
public void Do(string firstParam, int secondParam) { }
8181

82+
/// <summary>
83+
/// Do some thing.
84+
/// </summary>
85+
/// <typeparam name="T">The type argument. Used by <see cref="DoGeneric{T}(T)"/>.</typeparam>
86+
/// <param name="value">The param. Used by <see cref="DoGeneric{T}(T)"/>.</param>
87+
/// <returns>Returns a value <see cref="int"/>.</returns>
88+
/// <exception cref="ArgumentException">Thrown instead of <see cref="Exception"/>.</exception>
89+
public int DoGeneric<T>(T value) { throw new ArgumentException(); }
90+
8291
/// <summary>
8392
/// Gets some thing.
8493
/// </summary>

src/XMLDoc2Markdown/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ static int Main(string[] args)
8282

8383
string assemblyName = assembly.GetName().Name;
8484
XmlDocumentation documentation = new(src);
85-
8685
Logger.Info($"Generation started: Assembly: {assemblyName}");
8786

8887
IMarkdownDocument indexPage = new MarkdownDocument().AppendHeader(assemblyName, 1);

0 commit comments

Comments
 (0)