diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..b15999b --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3 @@ +# XMLDoc2Markdown + +See generated sample documentation [here](sample). diff --git a/docs/sample/Home.md b/docs/sample/Home.md new file mode 100644 index 0000000..0f1cc4d --- /dev/null +++ b/docs/sample/Home.md @@ -0,0 +1,10 @@ +# References + +## MyClassLib + +- [`Class1`](MyClassLib/Class1) + +## MyClassLib.SubNamespace + +- [`GenericClass`](MyClassLib.SubNamespace/GenericClass{T}) +- [`SubClass`](MyClassLib.SubNamespace/SubClass) diff --git a/docs/sample/MyClassLib.SubNamespace/GenericClass{T}.md b/docs/sample/MyClassLib.SubNamespace/GenericClass{T}.md new file mode 100644 index 0000000..cb78d50 --- /dev/null +++ b/docs/sample/MyClassLib.SubNamespace/GenericClass{T}.md @@ -0,0 +1,19 @@ +# GenericClass<T> + +`Namespace: MyClassLib.SubNamespace` + +Generic class. + +```csharp +public class GenericClass +``` + +## Methods + +| Type | Name | Summary | +| --- | --- | --- | +| `T` | GetGenericInstance() | Gets a new instance of generic param. | + +--- + +[`< Back`](./) diff --git a/docs/sample/MyClassLib.SubNamespace/SubClass.md b/docs/sample/MyClassLib.SubNamespace/SubClass.md new file mode 100644 index 0000000..f366e58 --- /dev/null +++ b/docs/sample/MyClassLib.SubNamespace/SubClass.md @@ -0,0 +1,20 @@ +# SubClass + +`Namespace: MyClassLib.SubNamespace` + +Sub class from [MyClassLib.Class1](MyClassLib#class1) + +```csharp +public class SubClass + : Class1 +``` + +## Methods + +| Type | Name | Summary | +| --- | --- | --- | +| `String` | ToString() | Convert instance to string. | + +--- + +[`< Back`](./) diff --git a/docs/sample/MyClassLib/Class1.md b/docs/sample/MyClassLib/Class1.md new file mode 100644 index 0000000..c12c312 --- /dev/null +++ b/docs/sample/MyClassLib/Class1.md @@ -0,0 +1,27 @@ +# Class1 + +`Namespace: MyClassLib` + +Class 1 + +```csharp +public class Class1 +``` + +## Properties + +| Type | Name | Summary | +| --- | --- | --- | +| `Int32` | Bar | The bar. | +| `String` | Foo | The foo. | + +## Methods + +| Type | Name | Summary | +| --- | --- | --- | +| `void` | DoSomeThing(`String` paramOne, `Int32` paramTwo) | Do some thing. | +| `String` | GetSomeThingElse(`String` param) | Gets some thing else. | + +--- + +[`< Back`](./) diff --git a/sample/MyClassLib/Class1.cs b/sample/MyClassLib/Class1.cs new file mode 100644 index 0000000..5317918 --- /dev/null +++ b/sample/MyClassLib/Class1.cs @@ -0,0 +1,42 @@ +namespace MyClassLib +{ + /// + /// Class 1 + /// + public class Class1 + { + /// + /// The foo. + /// + /// The foo. + public string Foo { get; set; } + + /// + /// The bar. + /// + /// The bar. + public int Bar { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public Class1() { } + + /// + /// Do some thing. + /// + /// The param one. + /// The param two + public void DoSomeThing(string paramOne, int paramTwo) { } + + /// + /// Gets some thing else. + /// + /// The param. + /// An empty string. + public string GetSomeThingElse(string param) + { + return string.Empty; + } + } +} diff --git a/sample/MyClassLib/MyClassLib.csproj b/sample/MyClassLib/MyClassLib.csproj new file mode 100644 index 0000000..be5c9ef --- /dev/null +++ b/sample/MyClassLib/MyClassLib.csproj @@ -0,0 +1,8 @@ + + + + netstandard2.0 + true + + + diff --git a/sample/MyClassLib/SubNamespace/GenericClass.cs b/sample/MyClassLib/SubNamespace/GenericClass.cs new file mode 100644 index 0000000..a63358c --- /dev/null +++ b/sample/MyClassLib/SubNamespace/GenericClass.cs @@ -0,0 +1,24 @@ +namespace MyClassLib.SubNamespace +{ + /// + /// Generic class. + /// + /// The type param. + public class GenericClass where T : new() + { + /// + /// Initializes a new instance of the class. + /// + public GenericClass() { } + + /// + /// Gets a new instance of generic param. + /// + /// The generic param. + /// The new instance. + public T GetGenericInstance() where T : new() + { + return new T(); + } + } +} \ No newline at end of file diff --git a/sample/MyClassLib/SubNamespace/SubClass.cs b/sample/MyClassLib/SubNamespace/SubClass.cs new file mode 100644 index 0000000..56f6038 --- /dev/null +++ b/sample/MyClassLib/SubNamespace/SubClass.cs @@ -0,0 +1,17 @@ +namespace MyClassLib.SubNamespace +{ + /// + /// Sub class from + /// + public class SubClass : Class1 + { + /// + /// Convert instance to string. + /// + /// A string. + public override string ToString() + { + return string.Empty; + } + } +} \ No newline at end of file diff --git a/src/XMLDoc2Markdown/MarkdownGenerator.cs b/src/XMLDoc2Markdown/MarkdownGenerator.cs index 27d22f9..f6d2fe3 100644 --- a/src/XMLDoc2Markdown/MarkdownGenerator.cs +++ b/src/XMLDoc2Markdown/MarkdownGenerator.cs @@ -155,7 +155,7 @@ public override string ToString() mb.Header(1, Beautifier.BeautifyType(type, false).Replace("<", "<").Replace(">", ">")); mb.AppendLine(); - mb.CodeQuote($"Manespace: {type.Namespace}"); + mb.CodeQuote($"Namespace: {type.Namespace}"); mb.AppendLine(); mb.AppendLine();