diff --git a/Documentation/README.md b/Documentation/README.md index 32490c9..fd04bb3 100644 --- a/Documentation/README.md +++ b/Documentation/README.md @@ -1,6 +1,6 @@ # Synergy.Documentation nuget package -Here is the documentation of the Synergy.Documentation and Synergy.Documentation.Annotations nuget packages. +Here is the documentation of the `Synergy.Documentation` and `Synergy.Documentation.Annotations` nuget packages. They were created to help developers to document their code in a simple way. It is based on the idea of [Docs as Code](https://www.writethedocs.org/guide/docs-as-code/). @@ -145,7 +145,8 @@ public class NoteTests .But("I want to show you how to use them") .Therefore("I want to show you how to use them") .Otherwise("I want to show you how to use them") - .Moreover("I want to show you how to use them"); + .Moreover("I want to show you how to use them") + .Reference("https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/"); } [Fact] diff --git a/Documentation/Synergy.Documentation.Annotations/Note.cs b/Documentation/Synergy.Documentation.Annotations/Note.cs index 3d30e5b..6439f77 100644 --- a/Documentation/Synergy.Documentation.Annotations/Note.cs +++ b/Documentation/Synergy.Documentation.Annotations/Note.cs @@ -31,4 +31,7 @@ public static T Otherwise(this T source, string reason) public static T Moreover(this T source, string reason) => source; + + public static T Reference(this T source, string link) + => source; } \ No newline at end of file diff --git a/Documentation/Synergy.Documentation.Tests/Architecture/Public/Api.of.Synergy.Documentation.Annotations.verified.md b/Documentation/Synergy.Documentation.Tests/Architecture/Public/Api.of.Synergy.Documentation.Annotations.verified.md index 376a6ef..58636fe 100644 --- a/Documentation/Synergy.Documentation.Tests/Architecture/Public/Api.of.Synergy.Documentation.Annotations.verified.md +++ b/Documentation/Synergy.Documentation.Tests/Architecture/Public/Api.of.Synergy.Documentation.Annotations.verified.md @@ -35,6 +35,10 @@ source: T?, reason: string ) : T? [Extension] + - Note.Reference( + source: T?, + link: string + ) : T? [Extension] - Note.Then( source: T?, reason: string diff --git a/Documentation/Synergy.Documentation.Tests/Comments/NoteTests.cs b/Documentation/Synergy.Documentation.Tests/Comments/NoteTests.cs index 20ada91..bb34077 100644 --- a/Documentation/Synergy.Documentation.Tests/Comments/NoteTests.cs +++ b/Documentation/Synergy.Documentation.Tests/Comments/NoteTests.cs @@ -19,7 +19,8 @@ public void ShowOff() .But("I want to show you how to use them") .Therefore("I want to show you how to use them") .Otherwise("I want to show you how to use them") - .Moreover("I want to show you how to use them"); + .Moreover("I want to show you how to use them") + .Reference("https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/"); } [Fact] diff --git a/Documentation/Synergy.Documentation.Tests/Docs/README.cs b/Documentation/Synergy.Documentation.Tests/Docs/README.cs index a6b4bba..edf9c28 100644 --- a/Documentation/Synergy.Documentation.Tests/Docs/README.cs +++ b/Documentation/Synergy.Documentation.Tests/Docs/README.cs @@ -25,7 +25,7 @@ public partial class README : READMEBase /// public virtual string TransformText() { - this.Write("# Synergy.Documentation nuget package\r\n\r\nHere is the documentation of the Synergy.Documentation and Synergy.Documentation.Annotations nuget packages.\r\nThey were created to help developers to document their code in a simple way.\r\nIt is based on the idea of [Docs as Code](https://www.writethedocs.org/guide/docs-as-code/).\r\n\r\n## Enlisting Public API\r\n\r\nTo enlist public API, we use the following tool:\r\n\r\n```csharp\r\n"); + this.Write("# Synergy.Documentation nuget package\r\n\r\nHere is the documentation of the `Synergy.Documentation` and `Synergy.Documentation.Annotations` nuget packages.\r\nThey were created to help developers to document their code in a simple way.\r\nIt is based on the idea of [Docs as Code](https://www.writethedocs.org/guide/docs-as-code/).\r\n\r\n## Enlisting Public API\r\n\r\nTo enlist public API, we use the following tool:\r\n\r\n```csharp\r\n"); #line 14 "C:\Projects\Synergy\framework\src\Documentation\Synergy.Documentation.Tests\Docs\README.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.ApiFile.ReadAllText())); diff --git a/Documentation/Synergy.Documentation.Tests/Docs/README.tt b/Documentation/Synergy.Documentation.Tests/Docs/README.tt index 86d7973..dcdb767 100644 --- a/Documentation/Synergy.Documentation.Tests/Docs/README.tt +++ b/Documentation/Synergy.Documentation.Tests/Docs/README.tt @@ -2,7 +2,7 @@ <#@output extension=".md"#> # Synergy.Documentation nuget package -Here is the documentation of the Synergy.Documentation and Synergy.Documentation.Annotations nuget packages. +Here is the documentation of the `Synergy.Documentation` and `Synergy.Documentation.Annotations` nuget packages. They were created to help developers to document their code in a simple way. It is based on the idea of [Docs as Code](https://www.writethedocs.org/guide/docs-as-code/). diff --git a/README.md b/README.md index c1a706e..3e5fa7d 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,5 @@ Click the image above to view the procject [Code Topology](http://htmlpreview.github.io/?https://github.com/synergy-software/synergy.framework/blob/master/docs/CodeTopologyReport.html) [Design by contract programming](https://github.com/synergy-software/synergy.framework/wiki/Contracts) + +[Docs As Code](Documentation/README.md) diff --git a/Synergy.Framework.sln b/Synergy.Framework.sln index e4dd6a5..689face 100644 --- a/Synergy.Framework.sln +++ b/Synergy.Framework.sln @@ -58,6 +58,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Synergy.Web.Api.Tests", "We EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Synergy.Documentation.Annotations", "Documentation\Synergy.Documentation.Annotations\Synergy.Documentation.Annotations.csproj", "{7C495E3F-9F11-4662-B8E5-56C68A227C36}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "!Docs", "!Docs", "{66529869-A724-46F6-B274-4599CC99D1F7}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU